
84 Cryptography with Open-Source Software
For another example, define a Vigen`ere cipher on messages m which are eight
character strings of uppercase characters (so that the set of all messag e s M has
cardinality 26
8
), with key words of length four. Then there are 26
4
possible
keywords. For every plaintext then, there are 26
4
possible ciphertexts, and
there are 26
8
different possible ciphertexts. Suppose each ciphertext is equally
likely, so that
Pr(c) = 2 6
−8
.
For a given ciphertext c, what is Pr(m|c)?
Since m = c − k, there are only 26
4
possible plaintexts corresponding to
this ciphertext, as there are o nly 26
4
different keys to apply. If m is one of
those ...