Thursday, July 2, 2009

Cryptologist Cracks a Presidential Code



For more than 200 years, buried deep down in Thomas Jefferson's correspondence and papers, there has been a mysterious cipher. It has been a coded message that has been remained unsolved until now. The cryptic message was sent to President Jefferson in 1801 by correspondent, Robert Patterson. Robert Patterson was a mathematics professor in at the University of Pennsylvania. Thomas Jefferson and Robert Patterson were both officials at the American Philosophical Society. This was a group promoted scholarly research in the sciences and humanities. They were also enthusiasts of ciphers and other codes and was usually exchanging letters about them.

In this message, Mr. Patterson set out to show the president and primary author of the Declaration of Independence what was deemed to be a flawless cipher. Mr. Patterson had wrote, "The art of secret writing engaged the attention both of the states-man & philosopher for many ages." He also added, "most ciphers fall far short of perfection.

To Robert Patterson's view, a perfect code had four properties. It should be adaptable to all languages. It should be simple to learn and memorize and it should be easy to write and read. The most important was that it should be absolutely inscrutable to all unacquainted with the particular key or secret of decyphering.

Robert Patterson then included in the letter an example of a message in his cipher. From what he wrote, the cipher was one that was so difficult to decode that it would defy the united ingenuity of the whole human race. There is no evidence that Thomas Jefferson, or anyone else for that matter, ever solved the code. But President Jefferson did believe the cipher was so inscrutable that he considered having the State Department use it, and passed it on to the ambassador to France, Robert Livingston.

The cipher finally met it's match with Lawren Smithline who is a 36-year-old mathematician. Dr. Smithline has a Ph.D in mathematics and he now works professionally with cryptology or code-breaking at the Center for Communications Research in Princeton, NJ. It is a division of the Insitute for Defense Analyses.

A couple years ago, Lawren Smithline's neighbor, who was working on a Jefferson project at Princeton University, told Smithline of Robert Patterson's mysterious cipher. Smithline who was intrigued, decided to take a look. "A problem like this cipher can keep me up all night," he says. After unlocking it's hidden message in 2007, Smithline articulated his problem-solving techniques in a recent paper in the magazine American Scientist in a profile in Harvard Magazine, his alma mater's alumni journal.

The code, Rober Patterson, made clear in his letter was not a simple subsitition cipher. That's when you replace one letter from the alphabet with another. The problem with substition ciphers is that they can be cracked by using what's termed frequently anaylsis, or you can study the number of times that a particular letter occurs in a message. For example, the letter "e" is the most common letter used in the English language. So if a code is long, whatever letter is appears the most is most likely to be the letter "e."

Because frequency anaylsis was already known in the 19th century, cryptographers of this time turned to other techniques. One was called a nomenclater. That is a catalog of numbers, each standing for a word, syllable, phrase or letter. President Jefferson's correspondence shows that he used several code books of nomenclaters. According to Rober Patterson's criteria, is that a nomenclator is too tough to memorize.

Thomas Jefferson even wrote about his own ingenious code. It's a model of which is at his home in Monticello, which is located in Charlottesville, Va., called the wheel cipher. The device consists of cylindrical pieces threaded onto an iron spindle, with letters inscribed in each wheel in a random order. Users can scramble or unscramble words simply by turning the wheels.

Mr. Patterson still had a few tricks up his sleeves. He wrote the message text vertically, in columns in left to right and he used no capital letters or spaces. The writing formed a grid, in this case about 40 lines to some 60 letters each. Then Rober Patterson broke the grid into sections of up to nine lines, numbering each line in the section from one to nine. In the next step, Patterson transcribed each numbering line to form a new grid, scrambling the order of numbered lines within each section. Every section however repeated the same jumbled order of lines.

According to Patterson, the trick to solving this puzzle meant you had to know the following which is knowing the number of lines in each section, the order in which those lines were transcribed and number of random letters added to each line. The key to the code consisted of a series of two-digit pairs. The first digit indicated the line of number within each section, while the second was the number of letters added to the beginning of rows. For instance, if the key was 58, 71, 33, that meant Patterson moved row five to the first line of a section and added eight random letters. Then he moved row seven to the second line and added one letter. Then he moved row three to third line and added three random letters. Robert Patterson estimated that the potential combinations to solve this puzzle was "upwards of ninety millions of millions."

After explaining this in the letter, Patterson wrote, "I presume the utter impossibility of decyphering will be readily acknowledged." Undaunted, Dr. Smithline, decided to tackle the cipher by analyzing the probability of digraphs or pairs of letters. Certain pairs of letters, such of "dx," don't exist in English, while some letters almost always appear next to a certain other letter such as "u" after "q."

To get a sense of language of patterns of the era, Dr. Smithline studied 80,000 letter-characters contained in Jefferson's State of Union addresses. He also counted the frequency of occurances of "aa," "ac," through "zz." Lawren Smithline then made a series of educated guesses, such as the number of rows per section. He also made guesses such as which two rows belong to each other, and the number of random letters inserted into a line.

To help vet his guesses, he turned to a tool that was not available in the 19th century, a computer algorithm. He used what was called, "dynamic programming," which solves large problems by breaking puzzles down into smaller pieces and linking together the solutions. The overall calculations that was necessary to solve this puzzle were fewer than 100,000 which Smithline says would be tedious to the 19th century, but doable.

After about a week of working on the puzzle, the numerical key to Rober Patterson's cipher emerged, 13, 34, 57, 65, 22, 78, 49. Using the digital key, he was able to unfurl the cipher's text which was, "In Congress, July Fourth, one thousand seven hundred and seventy six. A declaration by the Representatives of the United States of America in Congress assembled. When in course of the human events...."

That of course is the beginning, with a few liberties taken, to the Declaration of Independence which was written at least in part by Jefferson himself. "Patterson played this little joke on Thomas Jefferson and nobody knew until know," says Dr. Smithline. Now why can't they talk about stuff like this in history class?

- WSJ

No comments:

Post a Comment