Название | Information Security |
---|---|
Автор произведения | Mark Stamp |
Жанр | Зарубежная компьютерная литература |
Серия | |
Издательство | Зарубежная компьютерная литература |
Год выпуска | 0 |
isbn | 9781119505884 |
and we see that we have recovered the plaintext, attackatdawn
.
The bad news is that, unlike a simple substitution, the double transposition does nothing to disguise the letters that appear in the message. The good news is that the double transposition appears to thwart an attack that relies on the statistical information contained in the plaintext, since the plaintext statistics are dispersed throughout the ciphertext.
Even this simplified version of the double transposition is not entirely trivial to break. The idea of smearing plaintext information through the ciphertext is so useful that it is employed by modern block ciphers, as we will see in the next chapter.
2.3.5 One‐Time Pad
The one‐time pad, which is also known as the Vernam cipher, is a provably secure cryptosystem. Historically it has been used in various times and places, but it's not practical for most situations. However, it does nicely illustrate some important concepts that we'll see again later.
For simplicity, let's consider an alphabet with only eight letters. Our alphabet and the corresponding binary representation of letters appear in Table 2.1. It's important to note that the mapping between letters and bits is not secret. This mapping serves a similar purpose as, say, the ASCII code, which is not much of a secret either.
Table 2.1 Abbreviated alphabet
Letter | e | h | i | k | l | r | s | t |
Binary | 000 | 001 | 010 | 011 | 100 | 101 | 110 | 111 |
Suppose that Trudy, who is working as a Nazi spy in London during World War II, wants to use a one‐time pad to encrypt the plaintext message
She first consults Table 2.1 to convert the plaintext letters to the bit string
The one‐time pad key consists of a randomly selected string of bits that is the same length as the message. The key is then XORed with the plaintext to yield the ciphertext. For the mathematically inclined, a fancier way to say this is that we add the plaintext and key bits modulo 2.
We denote the XOR of bit
Now suppose that Trudy uses the key
which is the correct length to encrypt her message above. Then to encrypt, Trudy computes the ciphertext
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
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
Eve decrypts the ciphertext using the key given to her by Charlie and obtains