blog

Photo by Shahadat Rahman on Unsplash

The Code Book

by | Aug 11, 2012 | Developer Blog | 1 comment

When I was a boy, secret codes fascinated me, but eluded my understanding.  Oh, the simplest of them were easy enough to grasp, such as the Caesar cipher, where the alphabet is shifted by a set number of letters:

Plain alphabet  a b c d e f g h i j k l m n o p q r s t u v w x y z
Cipher alphabet D E F G H I J K L M N O P Q R S T U V W X Y Z A B C
Plaintext       v e n i,   v i d i,   v i c i
Ciphertext      Y H Q L,   Y L G L,   Y L F L

(excerpted from The Code Book, p. 12)

But it was the theory behind codes, and the practice of breaking them, or cryptanalysis, that was most engaging and mysterious.  Though studying Alice, Bob, and Eve and prime number cryptography in college classes helped, it was not until I came across Simon Singh’s The Code Book that I finally thought to myself, "I get it!".

The Code Book

Image of Simon Singh

Simon Singh, author of The Code Book

The Code Book is a mixture of storytelling and mathematical elucidation that walks the reader through the history of codes and code-breakers, from early Greek accounts of steganography through the downfall of Mary Queen of Scots, and ending with the frontiers of quantum cryptography.  At every stage, tales of historical figures are mixed with clear, detailed, and illustrated examples of the codes used at the time.  Almost every code is then followed by an analysis of its flaws and a study of the first exploits of those flaws.  The back and forth struggle between the code makers and breakers seems at once inevitable and mind-boggling for the sheer genius required in each evolutionary step.

Singh takes these complex ciphers and cryptanalyses and breaks them down into their simpler component parts with figures and tables, for instance looking at frequencies of letter usage in English versus a cyphertext:

Screen Capture

(excerpted from The Code Book, p. 76)

The book covers one-time pads, Minoan Linear B, the German Enigma machine, the RSA algorithm, quantum-signed money, and the Beale treasure, among many other topics, all with the same thorough level of explanation and gripping narration.  You’ll finish each chapter of this compelling, fascinating, thrilling, and insightful book feeling satisfied with yourself.

Sample a few random pages on Amazon’s book preview, or read some review excerpts.

+ more

Accurate Timing

Accurate Timing

In many tasks we need to do something at given intervals of time. The most obvious ways may not give you the best results. Time? Meh. The most basic tasks that don't have what you might call CPU-scale time requirements can be handled with the usual language and...

read more