Recently I read a book titled “The Code Book” by Simon Singh. I am so fascinated by the description of the events (leading to where we stand today) that I am motivated to pen down the key learning. It will serve two purposes, first, a quick future reference for me and other readers, second, it will help me in internalizing the concepts better. The book is a lucid description of the tussle between the code-makers (aiming to communicate securely) and the breakers (snooping into everything) – proving that story of encryption is not new, but as old as the civilization itself. It has evolved constantly to the needs of time and was driven by various factors, both economic and political.
Early Days
It all started with tactics which are as simple as hiding information in wooden tablets covered by a layer of wax to others using transposition and/or substitution. In transposition, each letter of a word retains its identity but changes its position, whereas, in substitution, each letter changes its identity but retain its position. In other words, while transposing a word for secrecy, you simply rearrange the letters based on a predetermined understanding between the sender and the receiver (“cow” can become “owc”), and in the case of substitution, you replace the letters of the word by a different letter (“cow” can become “ihp”, “c”, “o”, “w” is replaced by “i”, “h” and “p” respectively). The method used to encrypt the message is called the “algorithm”, which in turn uses the “key” to create the cipher text. Hence, for the recipient to be able to decrypt the message, he must be aware of both – the “algorithm” and the “key”.