Information Security. Mark Stamp

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

Читать онлайн книгу Information Security - Mark Stamp страница 19

Information Security - Mark Stamp

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

this is that we add the plaintext and key bits modulo 2.

      We denote the XOR of bit x with bit y as x circled-plus y. Since x circled-plus y circled-plus y equals x, decryption is accomplished by XOR‐ing the same key with the ciphertext. Modern symmetric ciphers utilize this magical property of the XOR in various ways, as we'll see in the next chapter.

      Now suppose that Trudy uses the key

upper K equals left-parenthesis 111 101 110 101 111 100 000 101 110 000 right-parenthesis

      which is the correct length to encrypt her message above. Then to encrypt, Trudy computes the ciphertext upper C as

StartLayout 1st Row 1st Column Blank 2nd Column monospace h 3rd Column monospace e 4th Column monospace i 5th Column monospace l 6th Column monospace h 7th Column monospace i 8th Column monospace t 9th Column monospace l 10th Column monospace e 11th Column monospace r 2nd Row 1st Column upper P 2nd Column 001 3rd Column 000 4th Column 010 5th Column 100 6th Column 001 7th Column 010 8th Column 111 9th Column 100 10th Column 000 11th Column 101 3rd Row 1st Column upper K 2nd Column 111 3rd Column 101 4th Column 110 5th Column 101 6th Column 111 7th Column 100 8th Column 000 9th Column 101 10th Column 110 11th Column 000 4th Row 1st Column upper C 2nd Column 110 3rd Column 101 4th Column 100 5th Column 001 6th Column 110 7th Column 110 8th Column 111 9th Column 001 10th Column 110 11th Column 101 5th Row 1st Column Blank 2nd Column monospace s 3rd Column monospace r 4th Column monospace l 5th Column monospace h 6th Column monospace s 7th Column monospace s 8th Column monospace t 9th Column monospace h 10th Column monospace s 11th Column monospace r EndLayout

      Converting these ciphertext bits back into letters, the ciphertext message to be transmitted is srlhssthsr .

      When her fellow Nazi spy, Eve, receives Trudy's message, she decrypts it using the same shared key and thereby recovers the plaintext

StartLayout 1st Row 1st Column Blank 2nd Column monospace s 3rd Column monospace r 4th Column monospace l 5th Column monospace h 6th Column monospace s 7th Column monospace s 8th Column monospace t 9th Column monospace h 10th Column monospace s 11th Column monospace r 2nd Row 1st Column upper C 2nd Column 110 3rd Column 101 4th Column 100 5th Column 001 6th Column 110 7th Column 110 8th Column 111 9th Column 001 10th Column 110 11th Column 101 3rd Row 1st Column upper K 2nd Column 111 3rd Column 101 4th Column 110 5th Column 101 6th Column 111 7th Column 100 8th Column 000 9th Column 101 10th Column 110 11th Column 000 4th Row 1st Column upper P 2nd Column 001 3rd Column 000 4th Column 010 5th Column 100 6th Column 001 7th Column 010 8th Column 111 9th Column 100 10th Column 000 11th Column 101 5th Row 1st Column Blank 2nd Column monospace h 3rd Column monospace e 4th Column monospace i 5th Column monospace l 6th Column monospace h 7th Column monospace i 8th Column monospace t 9th Column monospace l 10th Column monospace e 11th Column monospace r EndLayout

      Let's consider a couple of scenarios. First, suppose that Trudy has an enemy, Charlie, within the Nazi spy organization. Charlie claims that the actual key used to encrypt Trudy's message is

upper K prime equals left-parenthesis 101 111 000 101 111 100 000 101 110 000 right-parenthesis period

      Eve decrypts the ciphertext using the key given to her by Charlie and obtains

StartLayout 1st Row 1st Column Blank 2nd Column monospace s 3rd Column monospace r 4th Column monospace l 5th Column monospace h 6th Column monospace s 7th Column monospace s 8th Column monospace t 9th Column monospace h 10th Column monospace s 11th Column monospace r 2nd Row 1st Column upper C 2nd Column 110 3rd Column 101 4th Column 100 5th Column 001 6th Column 110 7th Column 110 8th Column 111 9th Column 001 10th Column 110 11th Column 101 3rd Row 1st Column upper K prime 2nd Column 111 3rd Column 101 4th Column 110 5th Column 101 6th Column 111 7th Column 100 8th Column 000 9th Column 101 10th Column 110 11th Column 000 4th Row 1st Column upper P prime 2nd Column 001 3rd Column 000 4th Column 010 5th Column 100 6th Column 001 7th Column 010 8th Column 111 9th Column 100 10th Column 000 11th Column 101 5th Row 1st Column Blank 2nd Column monospace k 3rd Column monospace i 4th Column monospace l 5th Column monospace l 6th Column monospace h 7th Column monospace i 8th Column monospace t 9th Column monospace l 10th Column monospace e 11th Column monospace r EndLayout

      Eve, who doesn't really understand crypto, orders that Trudy be brought in for questioning.

upper K double-prime equals left-parenthesis 101 111 000 101 111 100 000 101 110 000 right-parenthesis period

      When the Allies “decrypt″ the ciphertext using this “key,″ they find

StartLayout 1st Row 1st Column Blank 2nd Column monospace s 3rd Column monospace r 4th Column monospace l 5th Column monospace h 6th Column monospace s 7th Column monospace s 8th Column monospace t 9th Column monospace h 10th Column monospace s 11th Column monospace r 2nd Row 1st Column upper C 2nd Column 110 3rd Column 101 4th Column 100 5th Column 001 6th Column 110 7th Column 110 8th Column 111 9th Column 001 10th Column 110 11th Column 101 3rd Row 1st Column upper K double-prime 2nd Column 111 3rd Column 101 4th Column 110 5th Column 101 6th Column 111 7th Column 100 8th Column 000 9th Column 101 10th Column 110 11th Column 000 4th Row 1st Column upper P double-prime 2nd Column 001 3rd Column 000 4th Column 010 5th Column 100 6th Column 001 7th Column 010 8th Column 111 9th Column 100 10th Column 000 11th Column 101 5th Row 1st Column Blank 2nd Column monospace h 3rd Column monospace e 4th Column monospace l 5th Column monospace i 6th Column monospace k 7th Column monospace e 8th Column monospace s 9th Column monospace i 10th Column monospace k 11th Column monospace e EndLayout

      The Allies proceed to give Trudy a medal for her work against the Nazis.

      While not a proof, these examples serve to illustrate why the one‐time pad is secure in a stronger sense than the ciphers we have previously considered. The bottom line is that if the key is chosen at random, and used only once, then an attacker who obtains the ciphertext has no useful information about the message itself—any “plaintext″ of the same length can be generated by a suitable choice of “key,″ and all possible plaintexts are equally likely. From a cryptographer's point of view, it doesn't get any better than that.

      Of course, we are assuming that the one‐time pad cipher is used correctly. The key (or pad) must be chosen at random and used only once. And, since it is a symmetric cipher, the key must be known by both the encryptor and the intended recipient—and nobody else can know the key.

      Since we can't do better than provable security, why don't we always use the one‐time pad? Unfortunately, the cipher is impractical for most applications. Why is this the case? The crucial problem is that the pad is the same length as the message and since the pad is the key, it must be securely

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