Cryptography, Information Theory, and Error-Correction. Aiden A. Bruen

Чтение книги онлайн.

Читать онлайн книгу Cryptography, Information Theory, and Error-Correction - Aiden A. Bruen страница 23

Cryptography, Information Theory, and Error-Correction - Aiden A. Bruen

Скачать книгу

of this common secret key.

      For a numerical explanation, suppose we label a comma b comma ellipsis comma z by the numbers 0 comma 1 comma ellipsis comma 25. Using Caesar's key of three, the plain text message “six” is enciphered as follows:

six long right-arrow left-parenthesis 18 comma 8 comma 23 right-parenthesis long right-arrow Overscript k equals 3 Endscripts left-parenthesis 18 plus 3 comma 8 plus 3 comma 23 plus 3 right-parenthesis equals left-parenthesis 21 comma 11 comma 0 right-parenthesis right-arrow VLA Schematic illustration of Caesar cipher wheel.

      To decipher the message, reverse the operation (shift left by k spaces):

VLA right-arrow left-parenthesis 21 comma 11 comma 0 right-parenthesis long right-arrow Overscript k equals 3 Endscripts left-parenthesis 21 minus 3 comma 11 minus 3 comma 0 minus 3 right-parenthesis equals left-parenthesis 18 comma 8 comma 23 right-parenthesis right-arrow six

      In this case, we have 0 minus 3 equals 23. If x is a negative number, then it is replaced by 26 plus x. So, for example negative 3 gets replaced by 26 plus left-parenthesis negative 3 right-parenthesis equals 23. The reasoning is that upper R e m left-bracket negative 3 comma 26 right-bracket equals 23 since negative 3 equals 26 left-parenthesis negative 1 right-parenthesis plus 23. Alternatively, (see Chapter 19) we have negative 3 identical-to 23 left-parenthesis mod 26 right-parenthesis.

x right-arrow upper R e m left-bracket x plus k comma 26 right-bracket

      Similarly, deciphering is represented by the mapping

x right-arrow upper R e m left-bracket x minus k comma 26 right-bracket

      where k is the cipher key, with 1 less-than-or-equal-to k less-than-or-equal-to 25. In the case of the Caesar cipher, k equals 3. If x minus k is negative, then, as explained above, upper R e m left-bracket x minus k comma 26 right-bracket equals 26 plus left-parenthesis x minus k right-parenthesis.

      To break such a cipher, one can decrypt the message by trying all 26 keys (this is referred to as an exhaustive search). For long messages, the likelihood of a cipher text decrypting to two intelligible messages is small.

      We mention here briefly affine ciphers. They are similar to Caesar ciphers in that they are simple substitution ciphers, but they differ in that enciphering involves not only addition, but also multiplication as well.

      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:

StartLayout 1st Row StartLayout 1st Row 1st Column normal upper T 2nd Column normal upper M 3rd Column normal upper A 4th Column normal upper A 2nd Row 1st Column normal upper H 2nd Column normal upper Y 3rd Column normal upper T 4th Column normal upper T 3rd Row 1st Column normal upper E 2nd Column normal upper W 3rd Column normal upper T 4th Column normal upper D 4th Row 1st Column normal upper E 2nd Column normal upper I 3rd Column normal upper A 4th Column normal upper A 5th Row 1st Column normal upper N 2nd Column normal upper L 3rd Column normal upper C 4th Column normal upper W 6th Row 1st Column normal upper E 2nd Column normal upper L 3rd Column normal upper K 4th Column normal upper N EndLayout 2nd Row down-arrow 3rd Row upper T upper M upper A upper A upper H upper Y upper T upper T upper E upper W upper T upper D upper E upper I upper A upper A upper N upper L upper C upper W upper E upper L upper K upper N EndLayout

Скачать книгу