The Mathematics of Secrets by Joshua Holden takes readers on a tour of the mathematics behind cryptography. Most books about cryptography are organized historically, or around how codes and ciphers have been used in government and military intelligence or bank transactions. Holden instead focuses on how mathematical principles underpin the ways that different codes and ciphers operate. Discussing the majority of ancient and modern ciphers currently known, The Mathematics of Secrets sheds light on both code making and code breaking. Over the next few weeks, we’ll be running a series of cipher challenges from Joshua Holden. The last post was on subliminal channels. Today’s is on binary ciphers:

Binary numerals, as most people know, represent numbers using only the digits 0 and 1. They are very common in modern ciphers due to their use in computers, and they frequently represent letters of the alphabet. A numeral like 10010 could represent the (1 · 24 + 0 · 23 + 0 · 22 + 1 · 2 + 0)th = 18th letter of the alphabet, or r. So the entire alphabet would be:

The first use of a binary numeral system in cryptography, however, was well before the advent of digital computers. Sir Francis Bacon alluded to this cipher in 1605 in his work Of the Proficience and Advancement of Learning, Divine and Humane and published it in 1623 in the enlarged Latin version De Augmentis Scientarum. In this system not only the meaning but the very existence of the message is hidden in an innocuous “covertext.” We will give a modern English example.

Suppose we want to encrypt the word “not” into the covertext “I wrote Shakespeare.” First convert the plaintext into binary numerals:

plaintext: n o t
ciphertext: 01110 01111 10100

Then stick the digits together into a string:

011100111110100

Now we need what Bacon called a “biformed alphabet,” that is, one where each letter can have a “0-form” and a “1-form.”We will use roman letters for our 0-form and italic for our 1-form. Then for each letter of the covertext, if the corresponding digit in the ciphertext is 0, use the 0-form, and if the digit is 1 use the 1-form:

0 11100 111110100xx
I wrote Shakespeare.

Any leftover letters can be ignored, and we leave in spaces and punctuation to make the covertext look more realistic. Of course, it still looks odd with two different typefaces—Bacon’s examples were more subtle, although it’s a tricky business to get two alphabets that are similar enough to fool the casual observer but distinct enough to allow for accurate decryption.

Ciphers with binary numerals were reinvented many years later for use with the telegraph and then the printing telegraph, or teletypewriter. The first of these were technically not cryptographic since they were intended for convenience rather than secrecy. We could call them nonsecret ciphers, although for historical reasons they are usually called codes or sometimes encodings. The most well-known nonsecret encoding is probably the Morse code used for telegraphs and early radio, although Morse code does not use binary numerals. In 1833, Gauss, whom we met in Chapter 1, and the physicist Wilhelm Weber invented probably the first telegraph code, using essentially the same system of 5 binary digits as Bacon. Jean-Maurice-Émile Baudot used the same idea for his Baudot code when he invented his teletypewriter system in 1874. And the Baudot code is the one that Gilbert S. Vernam had in front of him in 1917 when his team at AT&T was asked to investigate the security of teletypewriter communications.

Vernam realized that he could take the string of binary digits produced by the Baudot code and encrypt it by combining each digit from the plaintext with a corresponding digit from the key according to the rules:

0 ⊕ 0 = 0
0 ⊕ 1 = 1
1 ⊕ 0 = 1
1 ⊕ 1 = 0

For example, the digits 10010, which ordinarily represent 18, and the digits 01110, which ordinarily represent 14, would be combined to get:

1 0 0 1 0

⊕

0 1 1 1 0

1 1 1 0 0

This gives 11100, which ordinarily represents 28—not the usual sum of 18 and 14.

Some of the systems that AT&T was using were equipped to automatically send messages using a paper tape, which could be punched with holes in 5 columns—a hole indicated a 1 in the Baudot code and no hole indicated a 0. Vernam configured the teletypewriter to combine each digit represented by the plaintext tape to the corresponding digit from a second tape punched with key characters. The resulting ciphertext is sent over the telegraph lines as usual.

At the other end, Bob feeds an identical copy of the tape through the same circuitry. Notice that doing the same operation twice gives you back the original value for each rule:

Thus the same operation at Bob’s end cancels out the key, and the teletypewriter can print the plaintext. Vernam’s invention and its further developments became extremely important in modern ciphers such as the ones in Sections 4.3 and 5.2 of The Mathematics of Secrets.

But let’s finish this post by going back to Bacon’s cipher. I’ve changed it up a little — the covertext below is made up of two different kinds of words, not two different kinds of letters. Can you figure out the two different kinds and decipher the hidden message?

It’s very important always to understand that students and examiners of cryptography are often confused in considering our Francis Bacon and another Bacon: esteemed Roger. It is easy to address even issues as evidently confusing as one of this nature. It becomes clear when you observe they lived different eras.

Given the hints, a good first assumption is that the ciphertext numbers have to be combined in such a way as to get rid of all of the fractions and give a whole number between 1 and 52. If you look carefully, you’ll see that 1/5 is always paired with 3/5, 2/5 with 1/5, 3/5 with 4/5, and 4/5 with 2/5. In each case, twice the first one plus the second one gives you a whole number:

Along with the help of fellow Davidson professor Michael Mossinghoff and Whittier professor Mark Kozek, Chartier developed FIFA Foe Fun, a program that enables us ordinary, algorithmically untalented folk to generate a slew of possible match outcomes. The tool weighs factors like penalty shoot-outs and the number of years of matches considered, all with the click of a couple buttons. Chartier used a similar strategy in his March Mathness project, which allowed students and basketball fans alike to create mathematically-produced brackets – many of which were overwhelmingly successful in their predictions.

Although the system usually places the most highly considered teams, like Brazil, Germany, and Argentina at the top, the gadget is still worth a look. Tinker around a bit, and let us know in the comments section how your results pan out over the course of the competition.

In the meantime, check out the video below to hear Chartier briefly spell out the logic of the formula.

The selection of critical, cutting-edge titles abounds, so if you’re interested in learning more about our other mathematics books, browse our catalog. You may also sign up to stay current on our publishing endeavors with ease here: http://press.princeton.edu/subscribe/ Your email address will remain confidential!

We’ll also see you at the Joint Mathematics Meeting January 9-12 in San Diego, CA at booth 311! The following book signings will be held at our booth:

Also, stop booth 311 to chat about March Mathness! We’re aiming to double last year’s six participating schools with a goal of twelve in 2013, providing entertainment for math and basketball aficionados alike! Find out more here in the meantime: http://blog.press.princeton.edu/march-mathness/

Upcoming Events

Following an unprecedented economic boom fed by foreign investment, the Russian Revolution triggered the worst sovereign default in history. Bankers and Bolsheviks tells the dramatic story of this boom and bust, chronicling the forgotten experiences of leading[...]

The troubling ethics and politics of philanthropy Is philanthropy, by its very nature, a threat to today’s democracy? Though we may laud wealthy individuals who give away their money for society’s benefit, Just Giving shows how such[...]

To what extent was Machiavelli a “Machiavellian”? Was he an amoral adviser of tyranny or a stalwart partisan of liberty? A neutral technician of power politics or a devout Italian patriot? A reviver of pagan[...]

Weekly Digest

Email Address*

First Name

Last Name

* = required field

The opinions expressed on the Princeton University Press Blog, including those of authors published by the Princeton University Press, are not necessarily the opinions of the Press or Princeton University, are written independent of, and without collaboration with, the Press and are solely the responsibility of those authors and not the responsibility of the Press.