Название | Information Security |
---|---|
Автор произведения | Mark Stamp |
Жанр | Зарубежная компьютерная литература |
Серия | |
Издательство | Зарубежная компьютерная литература |
Год выпуска | 0 |
isbn | 9781119505884 |
Using the key 3, we can encrypt the plaintext message
by looking up each plaintext letter in the table above and substituting the corresponding letter in the ciphertext row, or by simply replacing each letter by the letter that is three positions ahead of it in the alphabet. For the particular plaintext in (2.1), the resulting ciphertext is
To decrypt this simple substitution, we look up the ciphertext letter in the ciphertext row and replace it with the corresponding letter in the plaintext row, or we can shift each ciphertext letter backward by three. The simple substitution with a shift of three is known as a Caesar's cipher.3
There is nothing magical about a shift by three—any shift can be used in a Caesar's cipher. If we limit the simple substitution to shifts of the alphabet, then the possible keys are
and she suspects that it was encrypted with a simple substitution cipher using a shift by
This brute force attack is something that Trudy can always attempt. Provided that Trudy has enough time and resources, she will eventually stumble across the correct key and break the message. This most elementary of all crypto attacks is known as an exhaustive key search. Since this attack is always an option, it's necessary (although far from sufficient) that the number of possible keys be too large for Trudy to simply try them all in any reasonable amount of time.
How large of a keyspace is large enough? Suppose Trudy has a fast computer (or group of computers) that can test
Now, back to the simple substitution cipher. If we only allow shifts of the alphabet, then the number of possible keys is far too small, since Trudy can do an exhaustive key search very quickly. Is there any way that we can increase the number of keys? In fact, there is no need not to limit the simple substitution to a shifting by
plaintext: |
a b c d e f g h i j k l m n o p q r s t u v w x y z
|
ciphertext: |
Z P B Y J R G K F L X Q N W V D H M S U T O I A E C
|
In general, a simple substitution cipher can employ any permutation of the alphabet as a key, which implies that there are
2.3.2 Cryptanalysis of a Simple Substitution
Suppose that Trudy intercepts the following ciphertext, which she suspects was produced by a simple substitution cipher, where the key could be any permutation of the alphabet:
Since it's too much work for Trudy to try all
Figure 2.2 English letter relative frequencies
From the ciphertext frequency counts in Figure 2.3, we see that “ F
″ is the most common letter in the encrypted message and, according to Figure 2.2, “ E
″ is the most common letter in the English language. Trudy