Japanese cryptology from the 1500s to Meiji

However, the Japanese cipher had a twist that never seems to have been used in the West: using the last 14 letters of the Iroha poem to fill in the row and column headers.

This would have been important for a sengoku daimyō, for instance, if he experimented with sending coded messages over long distances by torches, flags, poles, or similar system.

The scarcity of evidence makes it impossible to draw any firm conclusions but tentatively it seems that senkoku period daimyō did not have much use for cryptology.

The fact that they did not do so, in writing at least, does not prove anything but, in light of the other evidence – and lack of it – does make the existence of black chambers of the European sort seem unlikely.

Yardley made his original break into the code by realizing that wi ub po mo il re re os ok bo was a i ru ra n do do ku ri tsu (Ireland independence).

According to Yardley, the Japanese codes his Black Chamber broke in 1919 were improved by a Polish cipher expert about a year later.

His exact words are [italics in original]:[8] Yardley was right about a Polish expert visiting Japan but he was mistaken about the timing.

A possibility that is ripe for further research, is that Japanese cryptologists studied one or more of the books on codes and ciphers that were occasionally published in Europe and America.

For example, Parker Hitt's 1916 book Manual for the Solution of Military Ciphers was hugely popular, selling around 16,000 copies in America.

[9] Japanese cryptographers supposedly improved their codes through sectioning – breaking the message into parts and rearranging them prior to encoding.

In fact, many commercial code books as far back as the 1850s had 50,000 groups – but governments were often reluctant to pay for the production of large codebooks.

Thus, the situation between the Washington Naval Conference and the mid-1920s was not that of a Polish officer helping to make Japanese codes much more secure.

[11] These two failures convinced the leaders of the Japanese army that they needed some outside help and for geopolitical reasons, they decided to turn to the Polish military.

Japanese sources make it clear that both Army and Navy officers attended Kowalefsky's three-month course, so some confusion is possible.

However, Yardley wrote, correctly, that Kowalefsky worked for the Army but was wrong about the year since he claimed that the Polish expert had arrived in 1920.

Hyakutake Harukichi was among the first group of Japanese officers to study in Poland and on his return was made the chief of the code section of the third department of the army general staff.

From the late 19th century they did not even need luck – Auguste Kerckhoffs published a general solution for polyalphabetic ciphers in 1883 in his book La Cryptographie militaire.

For example, the cryptographer can assign an appropriately large number of homophones to high-frequency letters and words like "n," "shi," and "owari" and only one or two code groups to lower frequency elements.

Unfortunately, there is no information on how tables were changed except for Yardley's vague "until all ten had been used in the encoding of a single message," quoted above.

Fortunately for cryptologists, random numbers are very difficult to come up with and creating, distributing, and managing pads for more than a handful of correspondents is beyond the capabilities of most governments.

[28] It would be very surprising if after five to ten years of training with the Poles, Japanese Army cryptologists were not already familiar with superenciphering with additive tables.

[29] Perhaps realizing the gap between theory and practice, Hara devised a small system for generating pseudo-random numbers that could be used by units whose charts were outdated and which could not be supplied with new ones.

It might have made a decent tactical field code – it is simple to use, requires only the paper charts and a pencil, and is easily changed.

The Polish military realized early on that machine enciphering would change the science of cryptology and from 1929 employed mathematicians to work on cryptanalysis.

[34] In fact, in the early 1930s, both the Japanese Navy and the Foreign Ministry switched to machine systems for their most secret messages.

Considering all the other gaikokujin oyatoi (hired foreigners) brought in to assist with "modernization" in the Meiji period, it is striking that such an important field as cryptology would be ignored.

Such an attitude would hardly have been limited to Japan in the 1910s or 1920s – despite their success at the Washington Naval Conference, and later public chastisement by Yardley, American codes remained weak right up to the early 1940s.

However, even America, thanks to its ties to Europe, had a cryptological history and a reserve of talented people who understood the problems and the solutions.

The Japanese Army cryptologists, despite training with the Polish military for over ten years, originally developed substandard codes.

Hara's system shows significant improvement and demonstrates an understanding of cryptography at least the same level as practiced by other major world powers in the early 1940s.