XXI
'We begin with your fragment of coded text, as Thomas presented it to me,' Bacon said. He spread out a parchment on the table:
'I was intrigued by the puzzle…'
'I knew he would be,' Thomas whispered to Joan. 'Very useful thing about scholars, that curiosity. He didn't even ask for a fee.'
Bacon glanced at Saladin. 'You. Tell me what you see.'
'I'm no scholar-'
'Just answer.'
'I see ten words,' Saladin said. 'Latin letters, not Arabic. I recognise none of the words, though.'
'And nor should you, for they aren't words at all. Even these groupings are a decoy, I quickly realised. This is no sentence. Look at them! What sentence has words of such regular lengths?'
'It is written in a cipher,' said Joan. 'That much is obvious.'
'Yes! But what cipher? What do we known about ciphers? You, Thomas?'
'Just get on with it, Roger.'
'Oh, very well. The first cipher was used by the Spartans, long before the birth of Christ. They had a device called a scytale. You would wrap a strip of leather around a baton, and write out your message; once unwrapped the letters are scrambled, you see, illegible to anyone who doesn't have a baton of the same dimensions. Tacitus wrote of codes and ciphers, as did the Greek Polybius. Julius Caesar used a substitution cipher, which depended on a simple cyclic displacement of the alphabet. Caesar used a displacement of three positions, while Augustus later used one.'
'I'll be the one to ask,' Joan said heavily. 'What is a "simple cyclic displacement"?'
Bacon reached for a bit of chalk and scribbled on the tabletop. 'You write out your alphabet. A, B, C, D. And you write it out again with the letters shifted through three spaces, say. D, E, F, G. You have the word you wish to encode, say "CAESAR". And you exchange the true letters for the shifted ones. So C becomes F, A is D, E is H…'
'I understand,' said Joan.
'Now, history tells us there have been ciphers a good deal more sophisticated than that. Polybius himself described a bilateral substitution system, which means… never mind! Happily for your weary brains, I soon concluded we aren't dealing with anything much more complex than Caesar's substitutions.'
'Why do you believe that?' Saladin asked.
'This is a message in the Latin alphabet, not Arabic or Persian or Greek. So it is surely a Latin message. The Moors of Spain are developing extremely advanced cryptographic systems, I'm told. But a thousand years after the Caesars, we Latin scholars still lag behind the rest in our ciphers as in everything else. One point on which I kept an open mind was which alphabet we are using here.'
'The Latin one,' said Saladin.
'Ah, but which Latin? Caesar used twenty-three letters. We use twenty-five, for we have added U and J. I thought it most likely the classic alphabet was the one employed.
'So I began my analysis. A common technique in breaking ciphers is to study the distribution of letters. The most common symbol is likely to correspond to a common letter in plain language – E perhaps, or S, or T. But this fragment is too short to enable such a count. I experimented with scytales of various dimensions, to no avail. And I tried all the possible cyclic permutations, with no luck either. With all the permutations exhausted, I racked my brains for a new way forward.'
Joan murmured, 'And in the end, after much heroic struggle, you found a way, did you?'
Bacon blithely ignored her sarcasm. 'A simple variant on cyclic substitution is to use a key.'
'A key?' Saladin asked.
'Caesar, for instance, could have used his own name.' He wrote it out: CAESAR. 'We must eliminate repetitions.' He crossed out the second A. 'Now we use this five-letter key as the foundation of our cipher.' He wrote out a twenty-three Latin letter alphabet with a code beneath it:
'You see? A substitution with the shift depending on the key word, and with those letters removed. So the word CAESAR now encodes as-' He wrote it out:
ECRQCP
'It's a poor sort of code,' Saladin observed. 'The last few letters are transcribed without change.'
'You're a practical man, I can see that,' Bacon said. 'That's true. But there are easy variants. The simplest is to put the key word at the end of the alphabet, not the beginning, and to proceed backwards.' He scribbled quickly,
'Now all the letters save one have a different symbol.'
'This is all very well,' Joan said, 'but we don't have a key, do we?'
'Oh, but we do,' Bacon said. 'You gave it to me – or rather, to Thomas.'
'I did? What key?'
'It was in the letter you received. From your cousin in Spain. The phrase she was particularly interested in, that appeared to be left incomplete on the scrap of parchment you held.'
'Incendium Dei,' Saladin said, wide-eyed.
Joan stared at Bacon. 'Can it really be as simple as that?'
Bacon grinned. He now had a full hold on their attention, Saladin thought, and he knew it. 'Shall we try it?' He wiped the table clean of chalk with his sleeve, and began to scribble again. The three of them bent over to see. 'We begin with the key,' Bacon said. He wrote,
INCENDIVM DEI
'The U replaced by V as you see. Next we eliminate duplicates.'
INCEDVM
'There is our key. So we construct our code. I tried out a forward substitution, but succeeded with a backward…' He scribbled rapidly.
'Now we reconstruct our message. That first B becomes a P, the M becomes R…'
Saladin stared at the new string, unreasonably disappointed. 'It's still nonsense.'
Bacon smiled, a magician with another trick to show. 'A simple transposition would be too easy. Our puzzle involves numbers as well as letters. Look at the "sentence" again. Nine "words" of five letters, and one of four. What sentence is as regular as that? What we have here is a simple string of letters, of length – how many, Thomas?'
'I'm not one of your Parisian students,' Thomas growled.
'Just answer,' Joan murmured.
'Forty-nine, then.'
'Good. What's significant about the number forty-nine?'
'Seven sevens,' said Saladin immediately.
'Very good!' said Bacon.
Thomas looked surprised. Saladin said, 'Some of the villagers think it's a lucky number. Seven times seven. That's how I know.'
'Seven squared,' Bacon said. 'That is surely a clue. So now, if we write out the decoded message again, not in these arbitrary blocks of five or four, but in a grid of seven by seven…'
'It still means nothing to me,' Joan said.
But Thomas was tracing the letters with a chalky fingertip. 'But if you read, not across, but down – else why put them in a grid at all? P – E – R… Give me that chalk, Roger.' He wrote out the letters, column by column, as a single line.