A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
C D E F G H I J K L M N O P Q R S T U V W X Y Z A B
In this case-a two-letter shift to the right-the cryptographer simply replaces the letters in the top line with those below, while the decipherer moves two letters backwards instead of two letters forward. This fairly crude system is known as the 'Caesar Alphabet', since it was first used by Julius Caesar in his communications with his troops in Spain and Syria. Such a system may be cracked, the books on my desk explained, by a little guesswork. For example, according to type-founders' bills the most common letter in the English alphabet is E, while the second most common is A, then O, then N, and so forth. The most common word is, of course, the definite article, 'the'. Now, given this small bit of information, the decipherer should first determine whether one particular letter occurs more than the others. Presumably the letter will not be E, because, like the other letters, the E will have been occulted beneath its impostor. Should he find one-the letter X, shall we say-it will become his candidate for the letter E. And should this letter frequently occur in conjunction with two others, he will have reason to suspect the trio together represents the definite article-and he will moreover have solved the identities of two more letters.
Or so he hopes. But he must proceed carefully. Snares may have been laid for him as he blunders along. The word may be spelled backwards or otherwise transposed. Or perhaps nulls-letters of no value-will have been inserted to throw him off the scent. The key might stipulate, for example, that the letter Y is a null and therefore is paired with nothing whatsoever in the plain-text. Or else the key might stipulate that every fifth letter in the cipher should be ignored, or that only the second letter in each line should be accounted. Or perhaps the definite article, or even the letter E itself, will have been omitted from the cipher altogether.
My mind was beginning to spin at the thought of these duplicities, so I turned from the books on covered writing to the cipher itself. By this time the sun had turned bullfinch-orange in the casement and the watchman was passing up and down the carriageway, ringing his bell. The most common letter in the text, I discovered, was K, of which I counted eleven. I made substitutions based on the assumption that K represented E, which meant, therefore, that the cipher alphabet would consist of a six-letter shift to the right of the plain-text alphabet. But after I made these simple changes the cipher was no clearer than before. It appeared that my cryptographer was a subtler creature than Julius Caesar.
I therefore decided that he must have used what was known to cryptographers as le système Vigenère , a more complex method in which a keyword is used to occult and then expose the letters in the plain-text. According to Vigenère, the keyword was the clue to the labyrinth of letters: the golden skein the decipherer unspools as he winds his way backwards and forwards. Its purpose is to explain which cipher alphabets-often as many as six or seven-have been substituted for the plain-text one. Usually it will be a single word, but occasionally two or three, or possibly even an entire phrase. Vigenère himself recommends a phrase, because the longer the keyword, the harder the cipher will be to solve.
Once more I felt daunted by the task confronting me. I had creaked open Vigenère's Traicté and was stumbling through passages of archaic French, trying to make sense of the long columns and tables of letters that filled page after page. Without the keyword it seemed that the cipher would be all but impossible to crack, since as many as a dozen codes might have to be solved in a single cipher.
At length, though, I discovered that le système Vigenère was really not as mysterious as all that, at least not in conception, and as a method of enciphering texts it was ingenious, not to mention dismayingly effective. As I studied the Traicté I came to see the great Vigenère as a wizard or conjuror whose medium was words and letters rather than chemicals or flames-words and letters whose shapes he transformed with the incantation of a spell or the gesture of a wand.
His method consists, like Caesar's, of polyalphabetic substitutions, but substitutions of a more complex variety, ones whereby the plain-text letters can be replaced by those in any one of twenty-five cipher alphabets. The plain-text letter A might be replaced in the cipher alphabet by C, as in the Caesar Alphabet. But it does not therefore follow that plain-text B will then be replaced in the cipher by the letter D: it could be replaced with equal probability by any one of the twenty-four other letters. Neither does it mean that when C reappears in the cipher it will once again represent the plain-text letter A, because A, too, might have changed its value. For in Vigenère's substitution table, any plain-text letter along the horizontal axis may be replaced by any one below it in the vertical or left-hand one, which becomes its cipher:
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
B C D E F G H I J K L M N O P Q R S T U V W X Y Z A
C D E F G H I J K L M N O P Q R S T U V W X Y Z A B
D E F G H I J K L M N O P Q R S T U V W X Y Z A B C
E F G H I J K L M N O P Q R S T U V W X Y Z A B C D
F G H I J K L M N O P Q R S T U V W X Y Z A B C D E
G H I J K L M N O P Q R S T U V W X Y Z A B C D E F
H I J K L M N O P Q R S T U V W X Y Z A B C D E F G
I J K L M N O P Q R S T U V W X Y Z A B C D E F G H
J K L M N O P Q R S T U V W X Y Z A B C D E F G H I
K L M N O P Q R S T U V W X Y Z A B C D E F G H I J
L M N O P Q R S T U V W X Y Z A B C D E F G H I J K
M N O P Q R S T U V W X Y Z A B C D E F G H I J K L
N O P Q R S T U V W X Y Z A B C D E F G H I J K L M
O P Q R S T U V W X Y Z A B C D E F G H I J K L M N
P Q R S T U V W X Y Z A B C D E F G H I J K L M N O
Q R S T U V W X Y Z A B C D E F G H I J K L M N O P
R S T U V W X Y Z A B C D E F G H I J K L M N O P Q
S T U V W X Y Z A B C D E F G H I J K L M N O P Q R
T U V W X Y Z A B C D E F G H I J K L M N O P Q R S
U V W X Y Z A B C D E F G H I J K L M N O P Q R S T
V W X Y Z A B C D E F G H I J K L M N O P Q R S T U
W X Y Z A B C D E F G H I J K L M N O P Q R S T U V
X Y Z A B C D E F G H I J K L M N O P Q R S T U V W
Y Z A B C D E F G H I J K L M N O P Q R S T U V W X
Z A B C D E F G H I J K L M N O P Q R S T U V W X Y
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
Thus the plain-text letter B in the top, horizontal, line could be replaced by any one of the twenty-five characters arranged vertically beneath it in the twenty-five possible cipher alphabets. The decipherer knows which of these cipher alphabets to choose only by means of the keyword, those few letters whose structure is logical but whose effect is nothing short of magical, like a spell chanted over a base metal which then miraculously transmutes itself into ingots of gold. The spell works when the letters of the keyword are superimposed on those of the cipher in a series of repetitions, so that each letter of the keyword is paired, on each of its repetitions, with one in the cipher-text. Then, the transmutation. The values of the letters in the cipher change according to which alphabet the letters in the keyword instruct the decipherer to employ. What follows is a smooth, steady interchange of letters, a textual metamorphosis in which the hidden inscription crystallises like alum immersed in water, reassembling its structure according to an ordained pattern. The act of decipherment becomes as simple and certain as flipping over playing-cards to read their values, or removing the satin mask to expose the villain's face.
Читать дальше