Читать книгу Cryptography, Information Theory, and Error-Correction - Aiden A. Bruen - Страница 44
2.3 The Scytale Cipher
ОглавлениеThe Scytale cipher was introduced around 500 BCE by the Spartans, who used this rather simple but effective method to send crucial planning data between generals and bureaucrats. Both the sender and receiver were in possession of a cylindrical tube of the same diameter. To encode the message, the sender would wrap a thin strip of paper around the tube, with the paper spiraling its way down the length of the tube. The message was then written on the strip, with letters being written one beneath the other until the end of the tube was reached. (The message was then continued by starting a new column of letters, and this process was repeated until the message was finished.) To encode, the sender would simply unwrap the paper, leaving a thin strip of unintelligible letters. To decode, the receiver only had to wrap the paper around their similar tube and read the message off in columns.
It is often much simpler to duplicate the Scytale process with pencil and paper. Using a preselected number of rows (this number is the cipher key), write the message in columns. Then, “unwrap” the message by writing a string of characters consisting of the concatenated rows. For example, the message “THE ENEMY WILL ATTACK AT DAWN” is encrypted as follows:
Knowledge of the cipher key reduces the decryption process to a trivial matter. Using the fact that the key for this example is six, count up the total number of characters and divide by six. Doing so yields the period of the sequence, which is four. Thus, by taking the first, fifth, ninth, characters, one can reconstruct the columns. Upon completion, the message can be read off, column by column.
The Scytale concept can be modified to create very complex ciphers. By arranging the plain text in varying matrix patterns and “unwrapping” in different ways, messages can be scrambled very effectively. The Scytale cipher, along with its variants, belongs to a class of ciphers called transposition ciphers, in which all plain text characters are present in the cipher text, but they appear in a substantially different order.