Magic (cryptography)


Magic was an Allied cryptanalysis project during World War II. It involved the United States Army's Signals Intelligence Service and the United States Navy's Communication Special Unit.

Codebreaking

Magic was set up to combine the US government's cryptologic capabilities in one organization dubbed the Research Bureau. Intelligence officers from the Army and Navy were all under one roof. Although they worked on a series of codes and cyphers, their most important successes involved RED, BLUE, and PURPLE.

RED

In 1923, a US Navy officer acquired a stolen copy of the Secret Operating Code codebook used by the Imperial Japanese Navy during World War I. Photographs of the codebook were given to the cryptanalysts at the Research Desk and the processed code was kept in red-colored folders. This code was called "RED".

BLUE

In 1930, the Japanese government created a more complex code that was codenamed BLUE, although RED was still being used for low-level communications. It was quickly broken by the Research Desk no later than 1932. US Military Intelligence COMINT listening stations began monitoring command-to-fleet, ship-to-ship, and land-based communications.

PURPLE

After Japan's ally Germany declared war in the fall of 1939, the German government began sending technical assistance to upgrade their communications and cryptography capabilities. One part was to send them modified Enigma machines to secure Japan's high-level communications with Germany. The new code, codenamed PURPLE, was baffling.
PURPLE, like Enigma, began its communications with the same line of code but then became an unfathomable jumble. Codebreakers tried to break PURPLE communiques by hand but found they could not. Then the codebreakers realized that it was not a manual additive or substitution code like RED and BLUE, but a machine-generated code similar to Germany's Enigma cipher. Decoding was slow and much of the traffic was still hard to break. By the time the traffic was decoded and translated, the contents were often out of date.
A reverse-engineered machine created in 1939 by a team of technicians led by William Friedman and Frank Rowlett could decrypt some of the PURPLE code by replicating some of the settings of the Japanese Enigma machines. This accelerated decoding and the addition of more translators on staff in 1942 made it easier and quicker to decipher the traffic intercepted.

PURPLE traffic

The Japanese Foreign Office used a cipher machine to encrypt its diplomatic messages. The machine was called "PURPLE" by U.S. cryptographers. A message was typed into the machine, which enciphered and sent it to an identical machine. The receiving machine could decipher the message only if set to the correct settings, or keys. American cryptographers built a machine that could decrypt these messages.
The PURPLE machine itself was first used by Japan in 1940. U.S. and British cryptographers had broken some PURPLE traffic well before the attack on Pearl Harbor. However, the PURPLE machines were used only by the Foreign Office to carry diplomatic traffic to its embassies. The Japanese Navy used a completely different crypto-system, known as JN-25.
U.S. analysts discovered no hint in PURPLE of the impending Japanese attack on Pearl Harbor. Nor could they, as the Japanese were very careful not to discuss their plan in Foreign Office communications. No detailed information about the planned attack was even available to the Japanese Foreign Office, as that agency was regarded by the military, particularly its more nationalist members, as insufficiently "reliable".
U.S. access to private Japanese diplomatic communications was less useful than it might otherwise have been because policy in prewar Japan was controlled largely by military groups like the Imperial Way Faction, and not by the Foreign Office. The Foreign Office itself deliberately withheld from its embassies and consulates much of the information it did have, so the ability to read PURPLE messages was less than definitive regarding Japanese tactical or strategic military intentions.
U.S. cryptographers had decrypted and translated the 14-part Japanese diplomatic message breaking off ongoing negotiations with the U.S. at 1 p.m. Washington time on 7 December 1941, even before the Japanese Embassy in Washington could do so. As a result of the deciphering and typing difficulties at the embassy, the note was delivered late to American Secretary of State Cordell Hull. When the two Japanese diplomats finally delivered the note, Hull had to pretend to be reading it for the first time, even though he already knew about the attack on Pearl Harbor.
Throughout the war, the Allies routinely read both German and Japanese cryptography. The Japanese Ambassador to Germany, General Hiroshi Ōshima, often sent priceless German military information to Tokyo. This information was routinely intercepted and read by Roosevelt, Churchill and Eisenhower. According to Lowman, "The Japanese considered the PURPLE system absolutely unbreakable… Most went to their graves refusing to believe the had been broken by analytic means… They believed someone had betrayed their system."

Distribution prior to Pearl Harbor

Even so, the diplomatic information was of limited value to the U.S. because of its manner and its description. "Magic" was distributed in such a way that many policy-makers who had need of the information in it knew nothing of it, and those to whom it actually was distributed saw each message only briefly, as the courier stood by to take it back, and in isolation from other messages. Before Pearl Harbor, they saw only those decrypts thought "important enough" by the distributing Army or Navy officers.
Nonetheless, being able to read PURPLE messages gave the Allies a great advantage in the war. For instance, the Japanese ambassador to Germany, Baron Hiroshi Ōshima, produced long reports for Tokyo which were enciphered on the PURPLE machine. They included reports on personal discussions with Adolf Hitler and a report on a tour of the invasion defenses in Northern France. General Marshall said that Ōshima was "our main basis of... information regarding Hitler's intentions in Europe".

Dewey and Marshall

During the 1944 election, Thomas Dewey threatened to make Pearl Harbor a campaign issue, until General Marshall sent him a personal letter which said, in part:
Dewey promised not to raise the issue, and kept his word.

Post-war debates

The break into the PURPLE system, and into Japanese messages generally, was the subject of acrimonious hearings in Congress post-World War II in connection with an attempt to decide who, if anyone, had allowed the disaster at Pearl Harbor to happen and who therefore should be blamed. During those hearings the Japanese learned, for the first time, the PURPLE cypher system had been broken. They had been continuing to use it, even after the War, with the encouragement of the American Occupation Government.
Much confusion over who in Washington or Hawaii knew what and when, especially as "we were decrypting their messages," has led some to conclude "someone in Washington" knew about the Pearl Harbor attack before it happened, and, since Pearl Harbor was not expecting to be attacked, the "failure to warn Hawaii one was coming must have been deliberate, since it could hardly have been mere oversight". However, PURPLE was a diplomatic, not a military code. Thus, only inferences could be drawn from PURPLE as to specific Japanese military actions.

History

When PURPLE was broken by the U.S. Army's Signals Intelligence Service, several problems arose for the Americans: who would get the decrypts, which decrypts, how often, under what circumstances, and crucially who would do the delivering. Both the U.S. Navy and Army were insistent they alone handle all decrypted traffic delivery, especially to highly placed policy makers in the U.S.. Eventually, after much to-ing and fro-ing, a compromise was reached: the Army would be responsible for the decrypts on one day, and the Navy the next.
The distribution list eventually included some—but not all—military intelligence leaders in Washington and elsewhere, and some—but, again, not all—civilian policy leaders in Washington. The eventual routine for distribution included the following steps:
  • the duty officer would decide which decrypts were significant or interesting enough to distribute
  • they would be collected, locked into a briefcase, and turned over to a relatively junior officer who would 'make the rounds' to the appropriate offices.
  • no copies of any decrypts were left with anyone on the list. The recipient would be allowed to read the translated decrypt, in the presence of the distributing officer, and was required to return it immediately upon finishing. Before the beginning of the second week in December 1941, that was the last time anyone on the list saw that particular decrypt.

    Decryption process

There were several prior steps needed before any decrypt was ready for distribution:
  1. Interception. The Japanese Foreign Office used both wireless transmission and cables to communicate with its off shore units. Wireless transmission was intercepted at any of several listening stations and the raw cypher groups were forwarded to Washington, D.C. Eventually, there were decryption stations in the Philippines as well. Cable traffic was collected at cable company offices by a military officer who made copies and started them to Washington. Cable traffic in Hawaii was not intercepted due to legal concerns until David Sarnoff of RCA agreed to allow it during a visit to Hawaii the first week of December 1941. At one point, intercepts were being mailed to Intelligence from the field.
  2. Deciphering. The raw intercept was deciphered by either the Army or the Navy. Deciphering was usually successful as the cipher had been broken.
  3. Translation. Having obtained the plain text, in Latin letters, it was translated. Because the Navy had more Japanese-speaking officers, much of the burden of translation fell onto the Navy. And because Japanese is a difficult language, with meaning highly dependent upon context, effective translation required not only fluent Japanese, but considerable knowledge of the context within which the message was sent.
  4. Evaluation. The translated decrypt had to be evaluated for its intelligence content. For example, is the ostensible content of the message meaningful? If it is, for instance, part of a power contest within the Foreign Office or some other part of the Japanese government, its meaning and implications would be quite different from a simple informational or instructional message to an embassy. Or, might it be another message in a series whose meaning, taken together, is more than the meaning of any individual message. Thus, the fourteenth message to an embassy instructing that embassy to instruct Japanese merchant ships calling at that country to return to home waters before, say, the end of November would be more significant than a single such message meant for a single ship or port. Only after having evaluated a translated decrypt for its intelligence value could anyone decide whether it deserved to be distributed.
In the period before the attack on Pearl Harbor, the material was handled awkwardly and inefficiently, and was distributed even more awkwardly. Nevertheless, the extraordinary experience of reading a foreign government's most closely held communications, sometimes even before the intended recipient, was astonishing. It was so astonishing, someone called it magic. The name stuck.