<<

rev-kasman.qxp 10/18/99 3:21 PM Page 1407

Book Review

Cryptonomicon Reviewed by Alex Kasman

Cryptonomicon ence). This pro- ject and the prob- Avon Books, 1999 lems the com- ISBN 0-380-97346-4 pany faces in 918 pages, $27.50 trying to create it provide a plausi- Neal Stephenson’s latest novel, Cryptonomicon, ble scenario for is a story of adventure, conspiracy, and war, laced considering some with a good deal of computer science and mathe- serious issues in matics. Although mathematics is not the main modern cryptog- subject of the book, any amount of mathematics raphy. For in- in a novel is rare, and Cryptonomicon contains so stance, the book much that even traditional reviews of this New touches both on York Times bestseller emphasize its mathematical possible govern- aspects. These aspects will be the focus of my re- ment abuse in the view. absence of a se- There is nothing quite like Stephenson’s two pre- cure code avail- vious novels, and . able to users of the Internet and on the potential However, as novels that take place in the future and use of the data haven for organized crime. focus largely on technologies beyond our present Of course, is necessary for a pro- means, both books fit nicely into the established ject such as the data haven, and, as the title would and popular genre of “science fiction”. Crypto- imply, discussions of codes and ciphers run nomicon is different. It follows two storylines: a throughout the book. Mathematicians with a back- computer-oriented one that takes place in the pre- ground in cryptanalysis might be especially inter- sent and a more mathematical one that takes place ested in a new output-feedback mode stream ci- during World War II. Because of the mathematical pher formally introduced in this book for the first content, Cryptonomicon is an example of what I like time. The code is described in greater detail in an to think of as “mathematical fiction”. appendix written by its creator, Bruce Sheier, the The modern storyline concerns computer pro- president of a computer security company. As grammer Randy Waterhouse, whose company is in- Sheier explains, the code is based on the permu- volved in a massive project to build a “data haven” tation group S54 and can be implemented using a (a secure computer site free of government influ- standard deck of 52 playing cards with two dis- Alex Kasman is professor of mathematics at the College tinguishable jokers. The code takes advantage of of Charleston. His e-mail address is kasman@math. the fact that the number of standard cards is twice cofc.edu. the number of letters in the English alphabet (a

DECEMBER 1999 NOTICES OF THE AMS 1407 rev-kasman.qxp 10/18/99 3:21 PM Page 1408

coincidence that is too good to ignore). Moreover, clear during a section in which he attempts to this code benefits in a nonquantifiable way from describe a functional relationship between Water- the ubiquity of decks of cards in our society. For house’s sex drive and his ability to concentrate on example, it is used in the book by two characters breaking enemy codes. Certainly the mathemati- occupying adjacent jail cells who are able to com- cal notation is being used in this context only as municate securely without arousing the suspicion a joke, but I could not help being disturbed by the of the guards by passing a deck of cards back and fact that the notation was being used incorrectly. forth. (Note that the Perl script for implementing (Specifically, he writes the code that appears in the text apparently has 1 an error in it and that a corrected version can be lim , n→∞ ( )n downloaded from the Web site mentioned in the c appendix.) which according to the description in the text Randy’s attention is temporarily drawn away should be a decreasing function of which is zero from the data haven when the crew laying the un- when >c.) A more entertaining bit of “fictional derwater cables for his company finds a sunken mathematics” is the bizarre fair division algorithm Nazi submarine which is mysteriously connected his family uses for dividing his grandmother’s to his grandfather. This discovery provides a link possessions among her children. Implementation to the historical portion of the novel, which follows of this algorithm involves physically placing the Randy’s grandfather, mathematician Lawrence Wa- possessions in appropriate positions in an empty terhouse. It was the elder Waterhouse’s job to parking lot representing the two-dimensional space break codes used by the Axis powers and to hide of monetary and emotional values. from them the fact that this had been done. This Along with the real historical events spread mission is achieved through mathematical meth- throughout the novel, there is also real mathe- ods as well as such “brute force” techniques as set- matics, including at least a small sample each of ting up fake spy stations behind enemy lines to Gödel’s theorem, Turing’s work on computability, “discover” things mentioned in coded messages Russell’s Principia Mathematica, the Riemann zeta and leaving a dead body at sea with false papers function, modular arithmetic, probability distrib- for the Germans to find. Of course, the last of utions, information theory, and, of course, crypt- these tricks is well known to have actually been analysis. It is in its presentation of real mathematics used by the Allies during the war. Although that this book differs most from other recent Stephenson declares in the acknowledgments, works of “mathematical fiction”, such as the films “[J]ust for the record, let me state that I made all Pi and Good Will Hunting. In the former, a mathe- of this up—honest!”, there are some grains of truth matician discovers a theoretical relationship be- hidden within the fiction, and it is difficult to tell tween chaos and the decimal expansion of the where the facts end and the fiction begins. number , which leads to an integer of tremendous There are many historical figures who appear interest to a Kabbalistic religious sect, an ability as characters in the book, such as Hermann Göring to predict the stock market, and extremely serious and . I was able to recognize at mental health problems. In the latter, a custodian least two real mathematicians. is a at a university attracts the attention of a Fields major character in this book. Of course, Turing’s Medalist by elegantly solving difficult problems life has previously been “fictionalized” in the bio- written on a blackboard, and the ensuing events graphical play Breaking the Code.1 Whereas that lead to soul searching and an answer to the ques- play was a character study exploring Turing’s hu- tion of whether he really wants to become a math- manity, in Cryptonomicon he is more like a deity, ematician. Another piece of recent mathematical having mythological significance because of the im- fiction, though not as well known, is the novel Dis- pact his work has had on modern computer sci- tress by Greg Egan, in which a “Theory of Every- ence. There is also a brief appearance by Abraham thing” is discovered by participants at a mathe- Sinkov, who is the author of a well-known text on matical physics conference and literally changes mathematical aspects of cryptography.2 the world. In each of these, a mathematical result Recognizing actual historical events or charac- is important, but no mathematics is presented to ters in the book was harder than distinguishing real the audience. It is presumed that they are interested mathematics from “fictional mathematics”. in the story but not in the math. Stephenson is not a mathematician, as becomes Cryptonomicon is unique among these recent works of mathematical fiction in that it makes a 1Breaking the Code, by Hugh Whitemore, opened in the serious attempt to explain some mathematics to West End in November 1986 and ran on Broadway until the reader. On the other hand, unlike Flatland,3 the April 1988. classic example of mathematical fiction, the math- 2A. Sinkov, Elementary Cryptanalysis: A Mathematical Ap- ematics in Crytponomicon is secondary to the story proach, New Mathematical Library, no. 22, Math. Assoc. of America, Washington, DC. 3Edwin A. Abbott, Flatland, 1880.

1408 NOTICES OF THE AMS VOLUME 46, NUMBER 11 rev-kasman.qxp 10/18/99 3:21 PM Page 1409

being told. Many of the mathematical ideas that n for the number of spokes and the notation Cryptonomicon communicates are spread casually in mod l (“where i =(1, 2, 3,... ,∞)” [sic]) for the throughout the text, and most are related to the position of the chain after i revolutions of the idea of discerning useful information from ap- wheel. Through an example he is able to convey parently (but not actually) random data. However, the important qualitative difference that occurs in there are also some more detailed passages dur- the case where l and n are relatively prime. ing which the author can really say something Someone with little mathematical confidence, ex- mathematical. perience, or interest may simply skip the five pages The first of these occurs when Lawrence Wa- that introduce these ideas and that eventually de- terhouse first arrives at Princeton as a very bright scribe the three- and four-wheeled Enigma ma- but inexperienced mathematician who has a new chines (or perhaps even skip the rest of the book). result on a problem combining mathematics with To someone already familiar with these mathe- mechanics. He runs into Turing (and fictional math- matical ideas, this section is easy reading and in- ematician Rudy von Hacklheber) at Fine Hall, and, teresting mainly because this is a clever way to pre- when they realize that they are interested in sim- sent the concept of modular arithmetic. Still, for ilar problems, they start a collaboration. It rapidly many readers I am sure that the easily understood becomes clear to Turing, however, that Water- example of the bicycle chain and the life-or-death house needs a quick review of the mathematical significance of the Enigma code will combine to history leading up to Turing’s famous work on make this an accessible and exciting introduction computing machines. This short lesson in the his- to a new mathematical topic. tory of mathematics is made more interesting by I really enjoyed reading Cryptonomicon, but it the disagreements between Turing and Hacklhe- may not appeal to everyone. Although the plots are ber (who believes that Turing is not giving suffi- clever and the presentation is compelling, the char- cient credit to Leibniz for his work in symbolic acters remain essentially one-dimensional through- logic) and by Waterhouse’s naïveté. For instance: out the entire book. The female characters in par- ticular seem more like plot contrivances than like [Turing]: But—you know Einstein? actual people. The writing style struck me as a combination of the styles of Kurt Vonnegut, Robert [Lawrence]: I’m not very good with Anton Wilson, and Thomas Pynchon—authors names. whose books appeal only to a limited but devoted following of readers. Moreover, Cryptonomicon [Turing]: The white-haired chap with has enough sex, violence, and drugs to be a major the big mustache? Hollywood movie (and so also enough to disturb some readers). [Lawrence]: Oh yeah, I tried to ask him Even if they do not read it, all mathematicians my sprocket question. He claimed he might want to know something about this book and was late for an appointment or some- the other examples of the rare genre of “mathe- thing. matical fiction”.4 Common science fiction devices such as transporters that instantly “beam” people There is an especially long mathematical di- from a planet to their orbiting ship, faster-than- gression whose purpose is to teach readers about light travel through “hyperspace”, and chemical so- modular arithmetic so that they can understand lutions that bestow eternal youth may have as the Enigma code used by the Germans during the much to do with the average person’s view of the war. The idea is introduced during a bike ride Wa- value of scientific research as the latest issue of terhouse and Turing take together in the English Nature. A fictional story about a biological exper- countryside. iment leading to a violent mutant roaming through The chain of Turing’s bicycle has one city sewers can have real consequences when it weak link. The rear wheel has one bent comes to legislation concerning genetically altered spoke. When the link and the spoke food. For the same reason, the interest that we as come into contact with each other, the mathematicians have in portrayals of mathemat- chain will part and fall onto the road. ics and mathematicians should go beyond simply This does not happen at every revolu- our own enjoyment of the stories. tion of the wheel—otherwise the bicy- Consider again the films Pi and Good Will Hunt- cle would be completely useless. It only ing. The argument could be made that the lesson happens when the chain and the wheel each protagonist learns by the end of the movie is are in a certain position with respect to each other. 4I am attempting to compile an extensive list of works of mathematical fiction at my Web page, http://math. Stephenson goes on to introduce variables in- cofc.edu/faculty/kasman/MATHFICT. I would be grate- cluding l for the number of links in the chain and ful for any additions others might be able to suggest.

DECEMBER 1999 NOTICES OF THE AMS 1409 rev-kasman.qxp 10/18/99 3:21 PM Page 1410

that if one thinks about mathematics, one will miss out on the really important things in life. As a result, neither film is a particularly good adver- tisement for mathematics. The photo of the author on the jacket flap of Cryptonomicon shows him as a young boy reading The First Book of Codes and Ciphers.5 Apparently Stephenson has a long-standing interest in this subject. The mathematicians in the story echo the author’s own interest in the mathematical aspects of cryptography, and it is clear that Stephenson ex- pects his readers to learn something about them from this novel and to share his interest as well. Moreover, readers see a definite “real world” ap- plication of the abstract mathematics in helping the Allies to win the Second World War. In other words, in Cryptonomicon mathematics looks the way mathematicians wish everyone could see it: as interesting (even to nonmathematicians like Stephenson himself) and useful. Some mathematicians can recall a particular book, article, or incident that sparked their initial interest in mathematics. Perhaps the best thing I can say about Cryptonomicon is this: I would not be at all surprised if many years in the future I hear people refer to Stephenson’s novel when explain- ing how they chose a career as a mathematician. Acknowledgments: Thanks to Allyn Jackson, Laura Kasman, Steve Newman, Hugo Rossi, Sam Schillace, and the anonymous reviewer for their ex- tremely helpful comments and corrections.

5Sam and Beryl Epstein, First Book of Codes and Ciphers, Watts Publishing, 1956.

1410 NOTICES OF THE AMS VOLUME 46, NUMBER 11