Codes and Ciphers

20141121
Unbreakable Codes

I’ve been ill, nothing serious, a cold, but it flattened me and for three weeks I couldn’t be bothered with anything.

Last week we went to the cinema to see the new film about WW2 code breaking at Bletchley Park titled ‘The imitation game’. The code breakers worked on the Enigma machine with its rotors and plug cables and broke it. After the war was won the government kept it quite and made and sold Enigma machines to many countries around the world then secretly read everything they sent. Devious or what? The film was entertaining and it seems also to follow the truth. I thoroughly enjoyed it myself.

Reading up a bit about it later it transpired that after the war the Russians must have been warned by their Oxbridge spies because they only used the unbreakable ‘one off pad’ system from then on. The OOP system has a list of random letters that code a message one letter at a time so there is no mechanical pattern to follow or break, letter frequency and Caesar Shifts weaknesses are not present. The sender and the receiver must both have the same list of letters so in fact there is always at least two copies of every OOP. If there wasn’t then it couldn’t be decoded by the receiver. The usual thing is to only have two copies that are then burnt after coding by the sender and the decoding by the receiver. I don’t know if a mechanical method of doing either exists but if the message is important enough to warrant OOP coding then all electronic handling should be avoided.
There is a wonderful book about it by Simon Singh called The Code Book, if you are at all interested it is, like all his stuff, difficult to put down. I must have loaned someone my copy because for the life of me, I can’t find it.

Here’s how OOP works:

Two people have the same list of random letters.

Say/ mcjdiesntoifdndio. (I just typed those blind.)

Each letter has a number as in A = 1 and O = 21 and Z = 26 all as their position in the alphabet.

Lets say my message is; urgent message

The OOP code is; MCJDIESNTOIFDNDIO
The message is; URGENTMESSAGE

so U is 21 + M that is13 = 34. 34 is of course more than the max 26 letters but you simply roll around the alphabet in a continuous circle so subtracting 26 from 34 leaves the number of the code letter. 34 – 26 = 8. The 8th letter of the alphabet is H so the letter to send in place of U is H.

R18 + C3 = 21 which = U. So for the second letter, R send U. It doesn’t matter that the previous letter was U as it’s a coincidence. It is possible to send the same letter when Z is in the OOP but it doesn’t matter, it is actually important that this is possible. One Enigma weakness was that an encoded letter could never be the actual letter to be encoded.

Decoding is the reverse;

You receive a message HU etc.
You have the One Off Pad list.
MCJDIESNTOIFDNDIO (That was a surprise, after typing the MCJ this computer filled in the rest of the code above for me. Shows that even with OOP there are weaknesses to be aware of.)

Anyway; H = 8 so subtract (the reverse of before) the M that represents 13 and it doesn’t work out in this combination does it? So add 26 (to roll around the alphabet) to the 8 and that is 34, now subtract the 13 and it leaves 21. 21 is letter U. That’s our first letter in plain language.

Next letter received is U. So U21 minus the next letter in our OOP series, C3 gives us 18. 18 is the letter R. Our second letter is R.

We have UR as the first two plain text letters of our message. URgentmessage.

Unbreakable but long winded.

The Russians must have mechanical machines that print out OOPs with two lists of random letters and a reference number at the top of each half that have to be delivered to Embassies around the world on a weekly basis. That is unless the computer has so many combinations that it is unbreakable now a days. Would you risk it?

There is a theory in academic circles that one day they will be able to break this code too but I doubt it. The test is a something about a cat in a box. Can we predict that the cat is dead or alive without opening the box? It’s a stupid construct of course because although they mean can it be predicted it is full of holes in the sense that the cat could scratch or meow or give off Carbon Dioxide. They don’t count in the experiment of course but it’s a daft construct because of this.

This entry was posted in Ramblings and tagged , , , , . Bookmark the permalink.

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.