Cryptonomicon by Neal Stephenson is an interesting and informative novel tying together different generations of cryptography. A passage I found most interesting was in the chapter ‘Cycles’. In this chapter, Stephenson expands on the fundamental mathematics behind the Enigma machine: modular arithmetic.
Stephenson compares modular arithmetic to Turing’s bike. For some reason, Turing’s bike has a rear wheel with one bent spoke and a weak chain link. When the spoke comes into contact with the chain at a certain position the chain will fall apart. The mathematical take on this occurring utilizes a series of variables. We assume that the spoke is at a degree of 0 (Θ=0) and the position of the chain (C) is at C=0, when the spoke can break the chain. The weak link is numbered 0, and follows, with I equaling the total number of links in the chain. The sprocket has n teeth, and after one full revolution of the wheel C=n (after two revolutions Θ =0 but now C=2n). With these variables, Stephenson draws an incredible connection to modular arithmetic. While C increases infinitely, the number of links does not, and at C=I the chain returns to C=0. According to Stephenson’s example, if there are 100 links (I=100) and 135 links have passed, C will equal 35 instead of 135. To put this into mathematical terms, C = 135 mod 100. In this way, Turing’s bicycle offers an interesting connection to the way an Enigma machine works. According to the period of an individual cycle within the machine, the difficulty in cracking a code increases. This period is similar to how Turing’s bicycle returns to Θ=0 and C=0. How exactly does this help determine when the chain will fall apart? According to Stephenson, this will happen when a multiple of n is also a multiple of I. This perspective provided me with a better understanding of modular arithmetic and showed how complex the Enigma machine can be when the period increases.
Image: “Hydroelectric Turbine,” by Guy Mason, Flickr (CC)