Cryptonomicon
And so it might be expected that Randy would be thinking all the time about America Shaftoe, his sexual target of choice, who (just to make things a lot worse) has probably been spending a lot of time in wetsuits lately. And indeed that is where his thoughts were directed at the moment Enoch Root was dragged in. But since then it has become evident that he needs to exercise some kind of iron mental discipline here and not think about Amy at all. Whilst juggling all of those chainsaws and puppies, he is also walking a sort of intellectual tightrope, with decryption of the Arethusa intercepts at the end of that tightrope, and as long as he keeps his eyes fixed on that goal and just keeps putting one foot in front of the other, he’ll get there. Amy-in-a-wetsuit is down below somewhere, no doubt trying to be emotionally supportive, but if he even glances in her direction he’s a goner.
What he’s reading here is a set of academic papers, dating to the 1930s and early forties, that have been heavily marked up by his grandfather, who went through them none-too-subtly gleaning anything that could be useful on the cryptographic front. That it’s none too subtle is a good thing for Randy, whose grasp of pure number theory is just barely adequate here. Chester’s minions had to scan not only the fronts of these pages but the backs too, which were originally blank but on which Grandpa wrote many notes. For example there is a paper written by Alan Turing in 1937 in which Lawrence Pritchard Waterhouse has found some kind of error, or at least, something that Turing didn’t go into in sufficient detail, forcing him to cover several pages with annotations. Randy’s blood absolutely runs cold at the very idea that he is being so presumptuous as to participate in such a colloquy. When he realizes just how deep over his head he is intellectually, he turns off his computer and goes to bed and sleeps the bootless sleep of the depressed for ten hours. Eventually he convinces himself that most of the junk in these papers probably has no direct relevance to Arethusa and that he just needs to calm down and filter the material carefully.
Two weeks pass. His prayers vis-à-vis the Hunk of Burning Love are answered, giving him at least a couple of days of relief during which he can admit the concept of Amy Shaftoe into his awareness, but only in a really austere and passionless way. Attorney Alejandro shows up occasionally to tell Randy that things are not going very well. Surprising obstacles have arisen. All of the people he was planning to bribe have been preemptively counter-bribed by Someone. These meetings are tedious for Randy, who thinks he has figured everything out. To begin with it’s Wing, and not the Dentist, who has caused all of this, and so Attorney Alejandro’s working on faulty assumptions.
Enoch, when he called Randy on the plane, said his old NSA buddy was working for one of the Crypt’s clients. It seems clear now that this client is Wing. Consequently Wing knows that Randy has Arethusa. Wing believes that the Arethusa intercepts contain information about the location of the Primary. He wants Randy to decrypt those messages so that he’ll know where to dig. Hence the whole setup with the laptop. All of Attorney Alejandro’s efforts to spring Randy loose will be unavailing until Wing has the information that he wants—or thinks he does. Then, all of a sudden, the ice will break, and Randy will unexpectedly be cut loose on a technicality. Randy’s so sure of this that he finds Attorney Alejandro’s visits annoying. He would like to explain all of this so that Attorney Alejandro could knock it off with the wild goose chase, and his increasingly bleak and dull situation reports on same. But then Wing, who presumably surveils these attorney/client conferences, would know that Randy had figured out the whole game, and Randy doesn’t want Wing to know that. So he nods through these meetings with his lawyer and then, for good measure, goes back and tries to sound convincingly bewildered and depressed as he gives Enoch Root the update.
He gets to the point, conceptually, where his grandfather was when he commenced breaking the Arethusa messages. That is, he has a theory in mind now of how Arethusa worked. If he doesn’t know the exact algorithm, he knows what family of algorithms it belongs to, and that gives him a search space with many fewer dimensions than he had before. Certainly few enough for a modern computer to explore. He goes on a forty-eight-hour hacking binge. The nerve damage in his wrists has mounted to the point where he practically has sparks shooting out of his fingertips. His doctor told him never again to work on these nonergonomic keyboards. His eyes start to go out on him too, and he has to invert the screen colors and work with white letters on a black background, gradually increasing the size of the letters as he loses the ability to focus. But at last he gets something that he thinks is going to work, and he fires it up and sets it to running on the Arethusa intercepts, which live inside the computer’s memory but have never yet been displayed upon its screen. He falls asleep. When he wakes up, the computer is informing him that he’s got a probable break into one of the messages. Actually, three of them, all intercepted on 4 April 1945 and hence all encrypted using the same keystream.
Unlike human codebreakers, computers can’t read English. They can’t even recognize it. They can crank out possible decrypts of a message at tremendous speed but given two character strings like
SEND HELP IMMEDIATELY
and
XUEBP TOAFF NMQPT
they have no inherent ability to recognize the first as a successful decryption of a message and the second as a failure. But they can do a frequency count on the letters. If the computer finds that E is the most common, followed by T, and so on and so forth, then it’s a pretty strong indication that the text is some natural human language and not just random gibberish. By using this and other slightly more sophisticated tests, Randy’s come up with a routine that should be pretty good at recognizing success. And it’s telling him this morning that 4 April 1945 is broken. Randy dare not display the decrypted messages onscreen for fear that they contain the information that Wing’s looking for, and so he cannot actually read these messages, as desperately as he’d like to. But by using a command called grep, which searches through text files without opening them, he can at least verify that the word MANILA occurs in two places.
Based on this break, with several more days’ work Randy solves Arethusa entirely. He comes up, in other words, with A(x) = K, such that for any given date x he can figure out what K, the keystream for that day would be; and just to prove it, he has the computer crank out K for every day in 1944 and 1945 and then use them to decrypt the Arethusa intercepts that came in on those days (without displaying them) and does the frequency count on them and verifies that it worked in each case.
So now he has decrypted all of the messages. But he cannot actually read them without transmitting their contents to Wing. And so now, the subliminal channel comes into play.
In cryptospeak, a subliminal channel is a trick whereby secret information is subtly embedded in a stream of other stuff. Usually it means something like manipulating the least significant bits of an image file to convey a text message. Randy’s drawn inspiration from the concept in his labors here in jail. Yes, he has been working on decrypting Arethusa, and that has involved screwing around with a tremendous number of files and writing a lot of code. The number of separate files he’s read, created, and edited in the last few weeks is probably in the thousands. None of them have had title bars on their windows, and so the Van Eck phreakers surveilling him have presumably had a terrible time keeping track of which is which. Randy can open a file by typing its title in a window and hitting the return key, all of which happens so fast that the surveillance people probably don’t have time to read or understand what he has typed before it disappears. This, he thinks, may have given him just a bit of leeway. He has kept a subliminal channel going in the background: working on a few other bits of code that have nothing to do with breaking Arethusa.
He got the idea for one of these when he was paging through the Cryptonomicon and discovered an appendix that contained a listing of the Morse code. Randy knew Morse code when he was a Boy Scout, and learned it again a few years ago when he was studying for a ham radio license, and it doesn’t
take him long to refresh his memory. And neither does it take him very long to write a little bit of code that turns his computer’s space bar into a Morse code key, so that he can talk to the machine by whacking out dots and dashes with his thumb. This might look a little conspicuous, if not for the fact that Randy spends half of his time reading text files in little windows on the screen, and the way you page through a text file in most UNIX systems is by whacking the space bar. All he has to do is whack it in a particular rhythm, a detail he’s relying on the surveillance guys to miss. The results all go into a buffer that is never displayed on the screen, and get written out to files with completely meaningless names. So, for example, Randy can whack out the following rhythm on his spacebar while pretending to read a lengthy section of the Cryptonomicon:
dash dot dot dot (pause) dot dot dash (pause) dash dot (pause) dash dot dot (pause) dash dash dash (pause) dash dot dash
which ought to spell out BUNDOK. He doesn’t want to open the resulting file on screen, but later, while he’s in the middle of a long series of other cryptic commands he can type
grep ndo (meaningless file name) > (another meaningless file name)
and grep will search through the first-named file to see if it contains the string “ndo” and put the results into the second-named file, which he can then check quite a bit later. He can also do “grep bun” and “grep dok” and if the results of all of these greps are true then he can be pretty confident that he has successfully coded the sequence “BUNDOK” into that one file. In the same way he can code “COORDINATES” into some other file and “LATITUDE” into another, and various numbers into others, and finally by using another command called “cat” he can slowly combine these one-word files into longer ones. All of these demands the same ridiculous patience as, say, tunneling out of a prison with a teaspoon, or sawing through iron bars with a nail file. But there comes a point, after he’s spent about a month in jail, when suddenly he’s able to make a window appear on the screen that contains the following message:
COORDINATES OF PRIMARY STORAGE LOCATIONS
SITE BUNDOK: LATITUDE NORTH FOURTEEN DEGREES THIRTY-TWO MINUTES… LONGITUDE EAST ONE TWO ZERO DEGREES FIFTY-SIX MINUTES…
SITE MAKATI: (etc.)
SITE ELDORADO: (etc.)
All of which is total bullshit that he just made up. The coordinates given for the Makati site are those of a luxury hotel in Manila, sited at a major intersection that used to be the site of a Nipponese military airbase. Randy happens to have these numbers in his computer because he took them down during his very early days in Manila, when he was doing the GPS survey work for siting Epiphyte’s antennas. The coordinates given for SITE ELDORADO are simply the location of the pile of gold bars that he and Doug Shaftoe went to examine, plus a small random error factor. And those given for SITE BUNDOK are the real coordinates of Golgotha plus a couple of random error factors that should have Wing digging a deep hole in the ground about twenty kilometers away from the real site.
How does Randy know that there is a site called Golgotha, and how does he know its real coordinates? His computer told him using Morse code. Computer keyboards have LEDs on them that are essentially kind of useless: one to tell you when NUM LOCK is on, one for CAPS LOCK, and a third one whose purpose Randy can’t even remember. And for no reason other than the general belief that every aspect of a computer should be under the control of hackers, someone, somewhere, wrote some library routines called XLEDS that make it possible for programmers to turn these things on and off at will. And for a month, Randy’s been writing a little program that makes use of these routines to output the contents of a text file in Morse code, by flashing one of those LEDs. And while all kinds of useless crap has been scrolling across the screen of his computer as camouflage, Randy’s been hunched over gazing into the subliminal channel of that blinking LED, reading the contents of the decrypted Arethusa intercepts. One of which says:
THE PRIMARY IS CODE NAMED GOLGOTHA. COORDINATES OF THE MAIN DRIFT ARE AS FOLLOWS: LATITUDE NORTH (etc.)
THE BASEMENT
* * *
AT THIS POINT IN HISTORY (APRIL OF 1945) THE word that denotes a person who sits and performs arithmetical calculations is “computer.” Waterhouse has just found a whole room full of dead computers. Anyone in his right mind—anyone other than Waterhouse and some of his odd Bletchley Park friends, like Turing—would have taken one look at these computers and assumed that they were the accounting department, or something, and that each slave in the room was independently toting up figures. Waterhouse really ought to remain open to this idea, because it is so obvious. But from the very beginning he has had a hypothesis of his own, much more interesting and peculiar. It is that the slaves were functioning, collectively, as cogs in a larger computation machine, each performing a small portion of a complex calculation: receiving numbers from one computer, doing some arithmetic, producing new numbers, passing them on to another computer.
Central Bureau is able to trace the identities of five of the dead slaves. They came from places like Saigon, Singapore, Manila, and Java, but they had in common that they were ethnic Chinese and they were shopkeepers. Apparently the Nipponese had cast a wide net for expert abacus users and brought them together, from all over the Co-Prosperity Sphere, to this island in Manila Bay.
Lawrence Waterhouse tracks down a computer of his own in the ruins of Manila, a Mr. Gu, whose small import/export business was destroyed by the war (it is hard to run such a business when you are on an island, and every ship that leaves or approaches the island gets sunk by Americans). Waterhouse shows Mr. Gu photos of the abaci as they were left by the dead computers. Mr. Gu tells him what numbers are encoded in those bead positions, as well as giving Waterhouse a couple of days’ tutorial on basic abacus technique. The important thing learned from this is not really abacus skills but rather the remarkable speed and precision with which a computer like Mr. Gu can churn out calculations.
At this point, Waterhouse has reduced the problem to pure data. About half of it’s in his memory and the other half scattered around on his desk. The data includes all of the scratch paper left behind by the computers. To match up the numbers on the scratch paper with the numbers left on the abaci, and thus to compile a flash-frozen image of the calculations that were underway in that room when the apocalypse struck, is not that difficult—at least, by the standards of difficulty that apply during wartime, when, for example, landing several thousand men and tons of equipment on a remote island and taking it from heavily armed, suicidal Japanese troops with the loss of only a few dozen lives is considered to be easy.
From this it is possible (though it approaches being difficult) to generalize, and to figure out the underlying mathematical algorithm that generated the numbers on the abaci. Waterhouse becomes familiar with some of the computers’ handwriting, and develops evidence that slips of scratch paper were being handed from one computer to another and then to yet another. Some of the computers had logarithm tables at their stations, which is a really important clue as to what they were doing. In this way he is able to draw up a map of the room, with each computer’s station identified by number, and a web of arrows interconnecting the stations, depicting the flow of paper, and of data. This helps him visualize the collective calculation as a whole, and to reconstruct what was going on in that subterranean chamber.
For weeks it comes in bits and pieces, and then one evening, some switch turns on in Lawrence Waterhouse’s mind, and he knows, in some preconscious way, that he’s about to get it. He works for twenty-four hours. By that point he has come up with a lot of evidence to support, and none to contradict, the hypothesis that this calculation is a variant of a zeta function. He naps for six hours, gets up, and works for another thirty. By that point he’s figured out that it definitely is some kind of zeta function, and he’s managed to figure out several of its constants and terms. He almost has it now. He sleeps for twelve hours, gets up and walks around Manila to clear his head, goes back to work,
and hammers away at it for thirty-six hours. This is the fun part, when big slabs of the puzzle, painstakingly assembled from fragments, suddenly begin to lock together, and the whole thing begins to make sense.
It all comes down to an equation written down on one sheet of paper. Just looking at it makes him feel weirdly nostalgic, because it’s the same type of equation he used to work with back at Princeton with Alan and Rudy.
Another pause for sleep, then, because he has to be alert to do the final thing.
The final thing is as follows: he goes into the basement of a building in Manila. The building has been turned into a signals intelligence headquarters by the United States Army. He is one of some half-dozen people on the face of the planet who are allowed to enter this particular room. The room amounts to a bit more than a quarter of the basement’s total square footage, and in fact shares the basement with several other rooms, some of which are larger than it is, and some of which are serving as offices for men with higher rank than Waterhouse wears on his uniform. But there are a few oddities connected with Waterhouse’s room: