Изменить стиль страницы

“It’s a little complicated. Let me show you some stuff.” He left and came back with a messy handful of papers. “Okay, the simplest cipher substitutes one letter for another, usually by shifting the alphabet a certain number of spaces, so that A becomes D and C becomes G and so on. It’s called a Caesar shift because Julius Caesar supposedly invented it, but obviously you can crack it in a few minutes if you know the normal frequencies of the letters in the language it’s written in.”

“ETAOIN SHRDLU.”

“You got it. Well, obviously, spies knew this, so they developed ciphering methods to disguise the frequency of letters by using a different alphabet to pick every substitution in the ciphertext.”

“You mean a literally different alphabet, like Greek?”

“No, no, I mean like this.” He pulled a paper out of the sheaf and smoothed it on the table. “In the sixteenth century the architect Alberti invented a substitution cipher that used multiple alphabets arranged on brass disks, and a little later in France a mathematician named Blaise Vigenère supposedly invented what they call a polyalphabetic substitution cipher using twenty-six Caesar-shifted alphabets, and I figured it or something like it would be known to Bracegirdle if he was studying the cipher arts at that time. This here is what they call a tabula recta or a Vigenère tableau. It’s twenty-six alphabets, one on top of the other, starting with a regular A through Z alphabet and then each successive one starts one letter to the right, from B through Z plus A, then C through Z plus A and B and so on, and there are regular alphabets along the left side and the top to serve as indexes.”

“So how do you use it to disguise frequencies?”

“You use a key. You pick a particular word and run it across the top of the tableau, lining each letter of the key up with each column and repeating it until you reach the end of the alphabet. For example, let’s pick Mary Peg as a key. It’s seven letters with no repeats, so it’s a good pick.” He wrote it out several times in pencil and said, “Now we need a plaintext to encipher.”

“Flee, all is discovered,” suggested Mary Peg.

“Always timely. So we write the plaintext over the key, like so…

F L E E A L L I S D I S C O V E R E D

M A R Y P E G M A R Y P E G M A R Y P

“And then to encipher, we take the first letter of the plaintext, which is F, and the first letter of the key, which is M, and then we go to the tableau, down from the F column to the row and we write the letter we find at the intersection, which just happens to be R. The next combination is L from flee and A from Mary, so L stays L, and the next is E and R, which gives V. And now see how this works: the next E is over the letter Y in our ‘Mary Peg’ key which gives C. The two Es in flee have different ciphertext equivalents, which is why frequency analysis fails. Let me knock this out real quick so you can see…”

Crosetti rapidly filled in the ciphertext and produced

F L E E A L L I S D I S C O V E R E D

R L V C P P R U S U G H G U H E I C S

“And notice how the double L in all is disguised too,” he said. “Now you have something that can’t be broken by simple frequency analysis, and for three hundred years no one could break a cipher like that without learning the key word. That’s mainly what they tortured spies for.”

“How do you break it?”

“By finding the length of the key word, and you do that by analyzing repeating patterns in the ciphertext. It’s called the Kasiski-Kerckhoff Method. In a long enough message or set of messages, FL is going to line up with MA again, and give you RL again, and there’ll be other two-and three-letter patterns, and then you count the distance between repeats and figure out any common numerical factors. In our example, with a seven-letter key you might get repeats at seven, fourteen, and twenty-one significantly more than would be the case by chance. Obviously, nowadays you use statistical tools and computers. Then when you know our key has seven letters, it’s a piece of cake, because what you have then is seven simple substitution alphabets derived from the Vigenère tableau, and you can break those by ordinary frequency analysis to decrypt the ciphertext or reconstruct the key word. There are downloadable decrypting programs that can do it in seconds on a PC.”

“So why haven’t you cracked it?”

He ran his hand through his hair and groaned. “If I knew that, I’d know how to crack it. This thing’s not a simple Vigenère.”

“Maybe it is, but it has a really long key. From what you said, the longer the key, the harder it would be to factor out the repeating groups.”

“Good point. The problem with long keys is that they’re easy to forget and hard to transmit if you want to change them. For instance, if these guys wanted to change the key every month to make absolutely sure that no spy had discovered it, they’d want something an agent could receive with a whisper in the dark or in a totally innocent message. What they do nowadays is that the agent gets what they call a onetime pad, which is a set of preprinted segments of an infinitely long, totally random key. The agent enciphers one message and then burns the sheet. It’s totally unbreakable even by advanced computers. But that kind of method wasn’t invented in 1610.”

“So what else?”

“It could be a grille, in which case we’re screwed.” Seeing her puzzled look, he added, “A Cartan Grille, a literal piece of stiff paper with holes punched in it that reveals the message when you place it over the page. That would mean it’s not a cipher at all. For example, assume the ciphertext I wrote is just random noise, but if you slide a grille over it you can get RUG or USE or RUSE…”

“But surely, if they were using a grille, the ciphered message would look like a normal letter. ‘Dear Mom, having a great time in London, bought a new doublet, baited some bears, wish you were here, love, Dick.’ And the grille would reveal the plaintext: ‘flee, all is discovered.’ I mean the point would be to allow the concealed message to pass as innocent, no?”

Crosetti tapped his head in the what-a-jerk gesture. “Of course. Obviously, I’m losing it. Anyway, I’m stumped-I have no idea where to go from here.”

“I rest my case. Like I said, you need a break.”

“You’re right.” He rubbed his face with both hands and then asked, “What day is this?”

“October 14. Why?”

“There’s a Caribbean film festival at BAM, and I wanted to catch Of Men and Gods. Maybe if I lose myself in gay Haitian voodoo, I’ll come back to it fresh.”

“That’s a good plan, dear,” said Mary Peg.

Something about her tone and the expression on her face made him pause. He regarded her narrowly: “What?”

“Nothing, hon. I thought that if you didn’t mind I’d take a look at it myself.”

“Hey, knock yourself out!” said Crosetti, with just a trace of smugness. “It’s not a crossword puzzle.”

He was gone for over four hours because after the movie played he ran into some film freak pals of his and went for coffee and they took the film apart technically and artistically, and he enjoyed the usual amusing and astringent conversation common to such groups, and made a couple of good points and got to talking with a small intense woman who made documentaries, and they exchanged numbers. Crosetti felt like a real person for the first time in what seemed to him a long while. It had been nearly two months since that thing with Rolly started and ended, leaving a peculiar emotional ash. Not love, he now thought. Chemistry, sure, but as his mother had pointed out, in order for chemistry to transmute into connection there had to be reciprocity and a modicum of commitment, which he had certainly not got from Rolly…just a nothingness and that stupid letter, oh, and P.S., bid a heartfelt bye-bye to Albert. It still griped him, not so much as a blow to his self-regard but as an insult to his aesthetics. It was wrong; he would never have written a plot point like that into a screenplay, and since he was a realist sort of auteur, he believed that such an event could not exist in the real world. Thus the subway thoughts of Crosetti.