Search This Blog & Get A Rife

Wednesday, February 18, 2015

Japanese Purple Cipher Machine

How the U.S. Cracked Japan's 'Purple Encryption Machine' at the Dawn of World War II
I'm sure many of you have heard of Nazi Germany's Enigma Machine, a code making piece of equipment that nearly stymied the Allies, but had cracked by the folks at Britain's Bletchly Circle. There's a movie called The Imitation Game out right now that deals with this very problem (as well as passing references in the Brit TV show The Bletchly Circle - very good show, by the way).

So... the Germans had a code machine... what about the Japanese?

The Japanese had the enigmatic Purple Machine.

Given the Japanese inability to say the letter "L", and a penchant for changing English words into the katakana alphabet, the word purple would be a bitch to say: "pa-pa-ru". Ugh. As such, I can only assume they had a different name for their code machine.

Just prior to WWII, the Japanese took the concept of the German Enigma Machine and improved its encryption devices to transmit their most top-level military secrets.

But here's the thing... the Japanese were unaware that even before the war on the U.S.--the attack on the US naval base at Pearl Harbor, Hawaii--that the Americans had cracked it.

Oshima Hiroshi (surname first), a Japanese diplomat, purchased an Enigma Machine from Germany in 1930, which they (Japan) then used to create their own encryption machine that was code-named "Red" by the Americans.

Japan's Navy intelligence used Red between 1931-36, when the U.S. Signal Intelligence Service (SIS) broke it.

But... apparently the SIS did not have the word "secret" in it, and word leaked back to Japan and created another encryption machine in 1937, the "97-shiki O-bun In-ji-ki" aka the "97 Alphabetical Typewriter."

Despite thee fact that there are three Japanese alphabets, the number 97 doesn't factor into that. Instead, the '97' is in reference to the Japanese year of 2597 - the number of years Japan reckons it has been a nation.

The Americans... they simply called this machine "Purple".

From what I understand, the Purple Machine consisted of: two typewriters and an electrical rotor system with a 25 character alphabetic switchboard.

With two typewriters, the Purple Machine was considered more complex than the Enigma.

While both the Enigma and Purple Machine utilized a single typewriter to manually input data (the message) in an non-encrypted format (also known as plaintext).

The Enigma Machine would then represent the message in form of blinking lights; but the Purple Machine used the second typewriter to type out the now-encrypted message onto some ancient artifact know as paper.

The cool thing about the Purple Machine was that you only needed one person to work it, while you needed two for the Enigma (one to type and one to write down the blinking lights message).

The drawback, however, was that since there were two typewriters, the Purple Machine was a bulky bastard and was not only difficult to move around, it was not used in combat zones.

How does it really work?
  1. The Purple Machine is able to encrypt all inputted messages with its four rotors and switchboard.
  2. There was a secret message key (A = "R" or 17 = "B") that was changed daily (like Enigma), which means that unless you had the key, you couldn't use it to decode secret messages.
  3. Thanks to a changing key, codebreakers had a bugger of a time finding patterns.
  4. The key is inputted into the Purple Machine via arrangement of the switchboard and rotors.
  5. The switchboard had 25 connections (25-character keyboard), which the operator could arrange into 6 pairs of connections, which would give them 70-trillion (70,000,000,000,000) possible arrangements to encrypt the message.
  6. On top of that, one could arrange the rotors in different starting positions to also vary the encryption.
  7. The rotors (aka stepping switches) would rearrange themselves as the first letter was inputted into it via the first keyboard, and then rearranged again for the next netter and again for the third letter and so on.
  8. Basically, the Purple Machine could run through 100's of thousands of encryptions before it ever repeated the same format. This meant that since messages weren't that long, there was no chance of a pattern being spotted by a codebreaker.
How the U.S. Cracked Japan's 'Purple Encryption Machine' at the Dawn of World War II
Okay... so now you have an encrypted message - how does anyone read the damn thing?

Well... the reader would need a Purple Machine of their own, and would need a REVERSE key to decrypt the message.

They would then type in the encrypted message via their first typewriter, and the Purple Machine would replace it with a decrypted message - the plaintext, that you and I could read.

Who used the Purple Machine?
Spies, you would think, but rather than think James Bond-san, Japanese diplomats and high ranking military dudes in enemy countries were the ones - Washington, London and even Berlin.

How the fug did anyone break the Purple Machine code?
Stupid carelessness.

As with any encrypted message, the more information you have, the better. Usually.

But... the Purple Machine was new in these pre-WWII days... so new that not everyone who received the message knew how to work the machine properly... so the Japanese ALSO sent the secret message by Red... the same encryption machine that was broken by the U.S. Signal Intelligence Service in 1936.

Why the hell you would send the same message twice - via the Red and the Purple - is beyond my limited intelligence, but one can assume that my intelligence is far superior to the average Japanese intelligence office of 1937.

Look... the reason Japan created the Purple Machine in 1937 was because they found out the US has broken Red! So why use it ever again? Why use it to duplicate messages of your new Purple Machine? That's just beyond idiotic!

So... armed with the still secret encrypted messages sent via the Purple Machine (what the hell is this??!!) and the revealed encrypted messages sent via Red, the U.S. was eventually able to break the damn Purple Machine code.

It wasn't easy, of course, but the Japanese had presented the U.S. with far too much information... and even when the Japanese receivers no longer used Red, still the more cyphers sent via the Purple Machine meant more data for the U.S. to try and use to break the code(s).

It was in 1939 that the U.S. Army hired the cryptography expert William Friedman.

William Friedman
Ach... poor Bill.

Born in 1891 and originally named Wolf, his Jewish family left Russia in 1892 and ended up in Pittsburgh, Pennsylvania, Americanizing his name to William in 1895.

Make no mistake about it, to be asked to lead the group to break the Purple Machine must have meant that Friedman was brilliant - and he was... still, the machine broke him 18 months after taking the job, having a mental breakdown and then being institutionalized in 1941 - but was pretty much back to feeling in the pink by 1943, when he went to England to work with Bletchly Circle.

But... Friedman and his team did manage to break the code first... doing so in 1940.

Friedman and his team realized (in their head) that unlike the Enigma which used rotors, the Purple Machine used stepper switches similar to what was being used in telephone exchanges of the day.

So... team member Leo Rosen of the SIS built an encryption machine of his own in late 1940, using the stepper switches... only later discovering that the stepper switches he had chosen were exactly the same stepper switches the Japanese designer of the Purple Machine had used... the exact same stepper switches. Now that's code-breaking!

The U.S.SIS had built a Purple Machine of their own without ever having seen a Japanese Purple Machine.

With data from the other messages they had intercepted, they could now decrypt any message with their own Purple Machine... and the Japanese had no clue their machine code was broken.

But... having a machine of their own didn't mean they could understand the Japanese coded messages. Remember? Japan changed the key every day.

It was in 1940 that codebreaker Lt. Francis A. Raven noticed that the Japanese did follow a pattern in the changing of the daily keys.

Raven spotted that each month was broken into three 10-day segments... there was the pattern. I don't get it, but the important thing is that Raven did.

What type of messages did the U.S. break?
Well... there was this important message that they intercepted that was going to the Japanese Embassy in Washington, DC... that ordered an end to any negotiations with the U.S.

This was on December 7, 1941... the same day that Japan attacked the U.S. naval base of Pearl Harbor, on the U.S. Protectorate of Hawaii... which makes it part of the U.S., of course. Hawaii didn't actually become a State until August 21, 1959.

For conspiracy theorists, there is a question regarding just WHEN the Purple message was decrypted and presented from U.S. SIS to the U.S. State Department.

The message is quite clear that by ordering a halt to Japan negotiations with the U.S., that something was up - like war... so... did they suspect that Japan was going to go to war with the U.S.?

Honestly - yes, the U.S. knew that war with Japan was imminent. Negotiations cut off? Yeah, that's bad. It means war... and it means war soon.

The problem is - and no conspiracy here - is that no one realized just how well-prepared the Japanese were for their coordinated decimation of Pearl Harbor.

The thing is... for days previous, Hawaii had expected Japan to attack, and front page headlines in the newspaper on the island said as much (see HERE)... it's just that no one knew exactly when or exactly where.

The when (pretty damn soon) could be guessed from the decoded message sent to Japanese politicians in Washington from Japan's head government.

The where? How the hell no one spotted such a large fleet or aircraft carriers... well... okay, it's a big ocean... but why didn't the Purple Machine or anyone else know that Japan was amassing a large plan of attack... why did no one know that the fleet was in the area? That's the real mystery. There is no conspiracy... just people either not knowing or or knowing not fast enough.

The conspiracy theorists say that the U.S. wanted to go to war against Japan to protect interests with China... and while Congress was basically neutral, by ignoring the decoded message,  Japan could attack Pearl Harbor and the U.S. could get its wish for war.

I don't know U.S. President FDR, but come on... that's just stupid. But... I suppose anything is possible. 

Remember... Japan still had no clue that the U.S. had broken its Purple Machine codes... and so it continued to use it for a few more years... with decrypted codes helping the U.S. to victories at Guadalcanal and Midway.

By the way, Friedman died on November 12, 1969. Enshrined in the U.S. Military Intelligence Hall of Fame, he was also awarded the Medal for Merit by U.S. President Harry Truman, and the National Security Medal by U.S. president Dwight Eisenhower.

Andrew Joseph

No comments:

Post a Comment