- Home
- DAVID KAHN
THE CODEBREAKERS Page 4
THE CODEBREAKERS Read online
Page 4
The intercept services missed little. Of the 227 messages pertaining to Japanese-American negotiations sent between Tokyo and Washington from March to December, 1941, all but four were picked up.
In Honolulu, where a large Japanese population produced nightmares of antlike espionage and potential sabotage, the 14th Naval District’s intelligence officer, Captain Irving S. Mayfield, had long sought to obtain copies of the cablegrams of Consul General Nagao Kita. If Rochefort’s unit could solve these, Mayfield figured, he might know better which Japanese to shadow and what information they sought.
His intuitions were sound. On March 27, 1941, not two weeks after May-field himself took up his duties, a young ensign of the Imperial Japanese Navy, 25-year-old Takeo Yoshikawa, who had steeped himself in information about the American Navy, arrived in Honolulu to serve as Japan’s only military espionage agent covering Pearl Harbor. Under the cover-name “Tadasi Morimura,” he was assigned to the consulate as a secretary. He promptly made himself obnoxious—and drew suspicion upon himself within the consulate staff—by coming to work late or not at all, getting drunk frequently, having women in his quarters overnight, and even insulting the consul himself on occasion. But he managed to tour the islands, and within a month was sending such messages as: “Warships observed at anchor on the 11th [of May, 1941] in Pearl Harbor were as follows: Battleships, 11: Colorado, West Virginia, California, Tennessee ….” These were sent in the consulate’s diplomatic systems, not in naval code.
But Mayfield’s hopes of peering into these secret activities through the window of a broken code were stymied by the refusal of the cable offices to violate the statute against interception. His desires grew more intense as another source failed to yield any information of counterespionage activity. For months one of his enlisted men, Theodore Emanuel, had tapped half a dozen of the consulate’s telephone lines, recorded the 50 or 60 calls made on them each day, and turned the recordings over to Lieutenant Denzel Carr for translation and summarization. But this eavesdropping produced at best some juicy items about bachelor Kita’s sex life (such as his chasing a maid around a bedpost one night after a sake-soaked Japanese wedding); there was little to help Mayfield.
So when David Sarnoff, president of the Radio Corporation of America, vacationed in Hawaii, Mayfield spoke to him. It was subsequently arranged that thenceforth R.C.A.’s Japanese consulate messages would be quietly given to the naval authorities. But the consulate rotated its business among the several cable companies in Honolulu, and R.C.A.’s turn was not due until December 1.
In Washington, however, intercepts overwhelmed GY and S.I.S. The tiny staff of cryptanalysts simply could not cope with all of them expeditiously. This difficulty was resolved in two ways.
One was to cut out duplication of effort. At first, both services solved all their Japanese diplomatic intercepts. But beginning more than a year before Pearl Harbor, messages originating in Tokyo on odd-numbered days of the month were handled by the Navy, those on even days, by the Army. Each began breaking the messages sent in from its own intercept stations until it reached the Tokyo date of origin; it would then retain them or send them over as the dates indicated. The cryptanalysts utilized the extra time to attack as-yet-unbroken systems and to clean up backlogs.
The other method was to concentrate on the important intercepts and let the others slide, at least until the important ones were completed. But how can a cryptanalyst tell which messages are important until he has solved them? He cannot, but he can assume that messages sent in the more secret systems are the more important. All dispatches cannot be transmitted in a single system because the huge volume of traffic would enable cryptanalysts to break it too quickly. Hence most nations set up a hierarchy of systems, reserving the top ones for their vital needs.
Japan was no exception. Though her Foreign Office employed an almost bewildering variety of different codes, resorting, from time to time, to the Yokohama Specie Bank’s private code, a Chinese ideographic code list, and codes bearing kata kana names, such as TA, JI, or HEN, it relied in the main on four systems. American cryptanalysts ranked these on four levels according to the inherent difficulty of their solution and the messages that they generally carried. Intercepts were then solved in the order of this priority schedule.
Simplest of all, and hence the lowest in rank and last to be read (excluding plain language), was the LA code, so called from the indicator group LA that preceded its codetexts. LA did little more than put kata kana into roman letters for telegraphic transmission and to secure some abbreviation for cable economy. Thus the kana for ki was replaced by the code form CI, the kana for to by IF, the two-kana combination of ka + n by CE. Its two-letter codewords, all of either vowel-consonant or consonant-vowel form and including such as ZO for 4, were supplemented by a list of four-letter codewords, such as TUVE for dollars, SISA for ryoji (“consul”), and XYGY for Yokohama. A very typical LA message is serial 01250 from the Foreign Minister to Kita, dated December 4, which begins in translation: “The following has been authorized as the year-end bonus for employee typists of your office.” This sort of code is generally called a “passport code” because it usually serves for messages covering the administrative routine of a mission, such as issuance of passports and visas, LA was a particularly simple one to solve, partly because it had been in effect since 1925, partly because of the regularities in its construction. For example, all kana that ended in e had as code equivalents groups beginning with A (ke = AC, se = AD), and all that began with k had code equivalents beginning or ending with C. Identification of one kana would thus suggest the identification of others.
One rung up the cryptographic ladder was the system known to the Japanese as Oite and to American codebreakers as PA-K2. The PA part was a two- and four-letter code similar to the LA, though much more extensive and with codegroups disarranged. The K2 part was a transposition based on a keynumber. The letters from the PA encoding were written under this key-number from right to left and then copied out in mixed order, taking first the letter under number 1, then the letter under number 2, until the row was completed. The process was repeated for successive rows.
For example, on December 4 Yoshikawa wired the Foreign Minister that “At 1 o’clock on the 4th a light cruiser of the Honolulu class hastily departed—Morimura.” In romaji (the roman-letter version of the kata kana) this became 4th gogo 1 kei jun (honoruru) kata hyaku shutsu ko—morimura. In PA, with the parentheses getting their own codegroups (OQ and UQ), it assumed this form: BYDH DOST JE YO IA OQ GU RA HY HY UQ VI LA YJ AY EC TY FI BANL, with FI indicating use four-letter code. (The code clerk made two errors. After encoding kata by VI, he encoded an extra ta into LA and an unnecessary re into TY.) This was then written under the keynumber from right to left, with an extra letter I as a null to complete the final five-letter group:
Transcribed line by line according to the numbers (S under 1 first, D under 2 second, etc.), prefixed with system indicator GIGIG and key indicator AUDOB, the message number, and the telegraphic abbreviation of Sikuyu (“urgent”), the message (with three more errors: the Y under 13 became the J in CJYHH, the F under 2 became the E in IYJIE, and the T under 9 became the I in AUIAY) became the one actually sent over Kita’s name:
GAIMUDAIJIN TOKIO
SIKYU 02500 GIGIG AUDOB SDEAT QYOUB DGORY HJOIQ YLAVE AUIAY CJYHH IYJIE ALBIN
KITA
PA-K2 did not pose much of a problem to experienced American crypt-analysts. Rochefort estimated that his unit could crack a PA-K2 message in from six hours to six days, with three days a good average. The transposition was vulnerable because each line was shuffled identically; the cryptanalyst could slice a cryptogram into groups of 15 or 17 or 19 and anagram these simultaneously until the predominant vowel-consonant alternation appeared on all lines; the underlying code could then be solved by assuming that the most frequent codegroups represented the most frequent kana (i, followed by ma, shi, o, etc.) and filling out the skeleton words that resulted. Since the
system had remained in use for several years, this reconstruction had long been accomplished by the Washington agencies. Hence solution involved only unraveling any new transposition and, with luck, might take only a few hours. It could also take a few days. Primarily because of PA-K2’s deferred position in the priority list, an average of two to four days elapsed between interception and translation.
The code clerk in Honolulu enveloped Yoshikawa’s final messages in PA-K2 only because higher-level codes had been destroyed December 2 on orders from Tokyo. Normally, espionage reports of shipping movements and military activities, sent routinely by Japanese consuls from their posts all over the world, were framed on that next level of secrecy. Here prevailed a succession of codes called TSU by the Japanese and the J series by Americans. These were even more extensive and more thoroughly disarranged than PA, and they were transposed by a system of far greater complexity than the rather simple and vulnerable K2. Furthermore, the code and the transposition were changed at frequent intervals. Thus J17-K6 was replaced on March 1 by J18-K8, and that in turn by J19-K9 on August 1.
The transposition was the real stumbling block. Like the K2, it used a keynumber, but it differed in being copied off vertically instead of horizontally, and in having a pattern of holes in the transposition blocks. These holes were left blank when the code groups are inscribed into the block. For example, letting the alphabet from A to Y serve as the code message:
The letters were transcribed in columns in the order of the keynumbers, skipping over the blanks: BJMV EHKT NW CGORX AFILQU DPSY. This would be sent in the usual five-letter groups.
The first step in solving a columnar transposition like this, but without blanks, is to cut the cryptogram into the approximately equal segments that the cryptanalyst believes represent the columns of the original block. The blanks vastly increase the difficulty of this essential first step because they vary the length of the column segments. The second step is to reconstruct the block by trying one segment next to the other until a codeword-like pattern appears. Here again the blanks, by introducing gaps in unknown places between the letters of the segments, greatly hinder the cryptanalyst.
A page of a Japanese codebook (about 1931)
The problems of solving such a system are illustrated by the fact that J18-K8 was not broken until more than a month after its introduction. The cryptanalysts had to make a fresh analysis for each pattern of blanks and each transposition key. The key changed daily, the blank-pattern three times a month. Hence J19-K9 solutions were frequently delayed. The key and pattern for November 18 were not recovered until December 3; those for November 28, not until December 7. On the other hand, solution was sometimes effected within a day or two. Success usually depended on the quantity of intercepts in a given key. About 10 or 15 per cent of J19-K9 keys were never solved.
This situation contrasts with that of PURPLE, the most secret Japanese system, in which all but 2 or 3 per cent of keys were recovered and in which most messages were solved within hours. Did the Japanese err in assessing the security of their systems? Yes and no. PURPLE was easier to keep up with once it was solved, but it was a much more difficult system to break in the first place than J19-K9. The solution of the PURPLE machine was, in fact, the greatest feat of cryptanalysis the world had yet known.
The cipher machine that Americans knew as PURPLE bore the resounding official Japanese title of 97-shiki O-bun In-ji-ki. This meant Alphabetical Typewriter ’97, the ’97 an abbreviation for the year 2597 of the Japanese calendar, which corresponds to 1937. The Japanese usually referred to it simply as “the machine” or as “J,”* the name given it by the Imperial Japanese Navy, which had adapted it from the German Enigma cipher machine and then had lent it to the Foreign Ministry, which, in turn, had further modified it. Its operating parts were housed in a drawer-sized box between two big black electrically operated Underwood typewriters, which were connected to it by 26 wires plugged into a row of sockets called a plugboard. To encipher a message, the cipher clerk would consult the thick YU GO book of machine keys, plug in the wire connections according to the key for the day, turn the four disks in the box so the numbers on their edges were those directed by the YU GO, and type out the plaintext. His machine would record that plaintext while the other, getting the electric impulses after the coding box had twisted them through devious paths, would print out the ciphertext. Deciphering was the same, though the machine irritatingly printed the plaintext in the five-letter groups of the ciphertext input.
The Alphabetical Typewriter worked on roman letters, not kata kana. Hence it could encipher English as well as romaji—and also roman-letter codetexts, like those of the J codes. Since themachin e could not encipher numerals or punctuation, the code clerk first transformed them into three-letter codewords, given in a small code list, and enciphered these. The receiving clerk would restore the punctuation, paragraphing, and so on, when typing up a finished copy of the decode.
The guts and heart of the machine were the plugboards and the coding wheels. They diverted the current flowing along the connections from the input typewriter to the output one so that when the a key was depressed on the input keyboard an a would not be typed on the output machine. The diversion began with the plugboard connections. If the coding box were not present, a plugboard wire would take the electric impulse from the a key of the plaintext typewriter and bring it directly to, say, the R typebar of the ciphertext machine. Other wires would similarly connect the plaintext keys to noncorresponding ciphertext typebars. This would automatically produce a cipher, though a very elementary one. Each time plaintext a was depressed ciphertext R would appear. So simple a system affords no security. The plugboard connections can be changed from message to message, or even within a message, but this does not noticeably augment the system’s strength.
Here is where the four coding wheels came in. Interposed between the plugboard of the plaintext typewriter and that of the ciphertext machine, they were shifted constantly with respect to one another by their supporting assembly. The enciphering current had to traverse their winding wire paths to get from one typewriter to the other, and the constant shifting continually set up different paths. Thus impulses from a given plaintext letter were switched through the box along ever varying detours to emerge at ever differing cipher-text letters. Plaintext a might be represented in a long message by all 26 letters. Conversely, any given ciphertext letter might stand for any one of 26 plaintext letters. Switches on the coding wheels could be flicked one way or the other; this constituted part of the key and was done by the code clerk before enciphering. Usually the plugboard connections were changed each day.
These factors united to produce a cipher of exceptional difficulty. The more a cipher deviates from the simple form in which one ciphertext letter invariably replaces the same plaintext letter, the harder it is to break. A cipher might replace a given plaintext letter by five different ciphertext letters in rotation, for example. But the Alphabetical Typewriter produced a substitution series hundreds of thousands of letters long. Its coding wheels, stepping a space—or two, or three, or four—after every letter or so, did not return to their original positions to re-create the same series of paths, and hence the same sequence of substitutes, until hundreds of thousands of letters had been enciphered. The task of the cryptanalysts consisted primarily of reconstructing the wiring and switches of the coding wheels—a task made more burdensome by the daily change of plugboard connections. Once this was done, the crypt-analyst still had to determine the starting position of the coding wheels for each day’s messages. But this was a comparatively simple secondary job.
American cryptanalysts knew none of these details when the Japanese Foreign Office installed the Alphabetical Typewriter in its major embassies in the late 1930s. How, then, did they solve it? Where did they begin? How did they even know that a new machine was in service, since the Japanese government did not announce it?
The PURPLE machine supplanted the RED machine,* which American cry
ptanalysts had solved, and so probably their first clue to the new machine was the disconcerting discovery that they could no longer read the important Japanese messages. At the same time, they observed new indicators for the PURPLE system. Clues to the system’s nature came from such characteristics of its ciphertext as the frequency of letters, the percentage of blanks (letters that did not appear in a given message), and the nature and number of repetitions. Perhaps the codebreakers also assumed that the new machine comprised essentially a more complicated and improved version of the one it replaced. In this they were right.
Their first essays at breaking into the cipher both accompanied and supplemented their attempts to determine the type of cipher. Their previous success with the RED machine and with the lesser systems had given them insight into the Japanese diplomatic forms of address, favorite phrases, and style (paragraphs were often numbered, for example). These provided the cryptanalysts with probable words—words likely to be in the plaintext—that would help in breaking the cipher. Opening and closing formulas, such as “I have the honor to inform Your Excellency” and “Re your telegram,” constituted virtual cribs. Newspaper stories suggested the subject matter of intercepts. The State Department sometimes made public the full texts of diplomatic notes from Japan to the American government, in effect handing the cryptanalysts the plaintext (or its translation) of an entire dispatch. (State reportedly did not pass the texts of confidential notes to the cryptanalysts, though this would have helped them considerably and was done by other foreign ministries.) Japan’s Foreign Office often had to circulate the same text to several embassies, not all of which had a PURPLE machine, and a code clerk might have inadvertently encoded some cables in PURPLE, some in other systems—which the cryptanalysts could read. A comparison of times of dispatch and length, and voilà!—another crib to a cryptogram. Errors were, as always, a fruitful source of clues. As late as November, 1941, the Manila legation repeated a telegram “because of a mistake on the plugboard.” How much more common must errors have been when the code clerks were just learning to handle the machine! The sending of the identical text in two different keys produces “isomorphic” cryptograms that yield exceedingly valuable information on the composition of the cipher.