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

Читать онлайн книгу.

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


Скачать книгу
alt="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

      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.

      The next classical cipher of great interest is known as the Vigenère cipher. Although it is a relatively simple concept, it has influenced many ciphers used throughout history, including some that are still in use today. The idea is to modify the notion of Caesar ciphers, which were covered in Section 2.2. Instead of a single cipher key, we make use of an entire keyword, which is a key in the form of a string of letters chosen by the user. For example, suppose we decide to use the word “encode” as our keyword. The enciphering process is carried out as follows. The keyword is repeated as many times as necessary to span the length of the message. Each letter corresponds to a number between 0 and 25 (so a equals 0, b equals 1, ellipsis, z equals 25). Then, to encipher, we add the corresponding numbers of the keyword and the message, subtracting 26 if the sum is bigger than 25. Then we switch back to letters to get the cipher text. For example, if the message letter is y (Скачать книгу