ArticleslgStudy

computer science

Magic (cryptography)

Magic (cryptography) is a computer science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Magic (cryptography) rather than just read about it. In short: Magic was an Allied cryptanalysis project during World War II. It involved the United States Army's Signals Intelligence Service (SIS) and the United States Navy's Communication Special Unit.

Key takeaways

  • Magic (cryptography) belongs to computer science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Magic (cryptography) to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Magic (cryptography) from memory before moving on to harder problems.

Reference excerpt

Magic was an Allied cryptanalysis project during World War II. It involved the United States Army's Signals Intelligence Service (SIS) 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 (and later civilian experts and technicians) 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 (to indicate its Top Secret classification). 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 (from the color obtained by mixing red and blue), 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 (even the most secret ones) 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 (see Station HYPO) 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 [cipher] 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 (at least before Pearl Harbor) saw each message only briefly, as the courier stood by to take it back, and in isolation from other messages (no copies or notes being permitted). 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 (including the D-Day invasion beaches). General Marshall said that Ōshima was "our main basis of... information regarding Hitler's intentions in Europe".

… excerpt ends here. Continue reading the full article.

Worked examples

Example 1 — a first encounter with Magic (cryptography)

Start with the simplest possible case. Write down what Magic (cryptography) claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In computer science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Magic (cryptography) before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Magic (cryptography) ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Magic (cryptography)

In research
Magic (cryptography) appears in computer science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Magic (cryptography) in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Magic (cryptography) is common in secondary-school and first-year university syllabi. It links to neighbouring topics History of cryptography, Internment of Japanese Americans, Signals intelligence of World War II, so understanding it makes those chapters shorter.
In everyday life
Look for Magic (cryptography) outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.

Affiliate

Preply — study more efficiently by working with a personal tutor. 50% off.

How to study Magic (cryptography) in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Magic (cryptography) means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Magic (cryptography) out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Magic (cryptography) in simple terms?

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

Why does Magic (cryptography) matter?

Because it connects several computer science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Magic (cryptography)?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Magic (cryptography).

Tags

  • History of cryptography
  • Internment of Japanese Americans
  • Signals intelligence of World War II
  • Thomas E. Dewey

Keep exploring