A history of code

Browse By

Since the beginning of time, people have kept secrets. To prevent other people from knowing said secrets, people began to use coding. In code, even if the message is leaked to someone else, without the right key they still cannot decode the message and acquire the meaningful information they want.

The whole history of coding probably starts with Julius Caesar. He created a method to encrypt messages by shifting the order of letters. We can shift it by one, by two, by three… up to 25. This method would be the most straightforward code we can generate, however, it is also the easiest code to break. Since there are only 25 possibilities, decoders can just try all the possibilities one by one.

Then someone else came up with a better idea. Instead of shifting the alphabet table, we can use random letters to replace the original letters, as long as the recipients have the key to decode this. For an interceptor or the enemy without the right key, the number of possibilities to try could be very frustrating. How many? It would take two billion years for all the people on Earth (seven billion) to check one possibility each, at every second, to decode a single message. Think Mission Impossible.

This type of coding was reasonably hard to decode until a man called Al-Kindi pointed out a method to hugely reduce the number of possibilities by using frequency analysis. As you may know, e is the most common letter in English, t is the second most common, and a is the third. Therefore, the most frequent letter in the secret letter, whatever the letter is, must represent e (although sometimes could be t). Suddenly this coding method becomes so much easier to decrypt and is no longer reliable.

A very famous example of this is the secret message from Mary, Queen of Scots. Mary desired to take over England. To prepare the ruler’s assassination when she was put in jail, she used secret messages to communicate with her supporters. She had a man to help to transfer the message from prison to the outside world in a glass beer bottle. However, this man was a double agent and let her captors make a copy of those secret messages before passing them on to Mary’s other supporters without telling them. After decoding the messages, the assassination was discovered, and Mary was executed.

One of the original Enigma machines

During the second world war, the Germans invented the so-called-unbreakable coding machine, Enigma. This machine is a beautifully made encryption machine that can do both coding and decoding as long as the settings are the same. However, the Germans were so proud of and confident about their machine and did not consider the possibility that the code might be broken, which is understandable, as there are 159 quadrillion possibilities to check each day (159 with 18 zeros after it). Alan Turing, who was the leader of the decrypting group in Bletchley Park, built a machine called the bombe machine, that can decode the German Enigma machine settings of the day in 20 minutes, which allowed the allies to gain intelligence of Nazi orders faster than the Germans themselves. This helped to shorten the war for by at least 14 years, and saved hundreds of thousands of lives. Again, the unbreakable machine was broken.

In the modern world, people have more secrets to protect, from our PIN and credit card number to our passwords to different online shopping websites, such as Amazon and eBay. As modern computers were getting faster and smarter, and continue to do so, especially with the rise of quantum computers, we started to worry about where our information is stored and whether it is safe or not. We are facing huge possibilities of information being leaked. At this point, we turned to maths for solutions. We use prime numbers. Fermat raised this. If we use two prime numbers as our two keys, then the product number becomes the puzzle that our “enemies”, the hackers, need to solve. It is extremely difficult to solve such a code, as one must consider all primes, beginning from two. This makes for a very strong code.

However, as with all the methods stated above, it seems that nothing is unbreakable. As computers, especially quantum computers, can calculate at extremely high speed, it has been far easier to decode a message, a credit card number or other information, even within 20 minutes or so.

So, people started to look for solutions using physics. Recently, a new method was raised, which is called Quantum Key Distribution (QKD). This uses some of the fundamental properties of quantum physics to create a better key or coding method to encrypt messages. Quantum numbers in a pair are randomly generated and dependent on each other, with only the sender and receiver holding the key of course. If someone else attempts to intercept the message, the key will change and nobody can find the key.  Once the receiver finds out that the key was close to being stolen, the key can be sent back and regenerated.

This would provide a much more efficient way of making a message secret, but the only problem is that quantum is so easily affected by radio, or even human bodies, so it cannot be used over a long distance. However, not very long ago, the Chinese quantum satellite Micius conducted a message transfer from Austria to China, a distance of 7600km, which is the furthest so far, giving us hope of seeing the Quantum Key Distribution method used in the very near future.

Again, no one can guarantee the security of even this code, and all we can do is keep improving the method we use.