Next, we will talk about the probabilities that come up in the
abstract theory of cipher systems. We suppose we have a set M of
``messages'' or ``plaintexts,'' a set C of ciphertexts, and a set
F of enciphering transformations. For a given plaintext
(or
piece of plaintext), we can choose an enciphering transformation fand compute the ciphertext
.
All this is described in
Chapter 3 of [Beutelspacher, 1994].
It is essential that we give the ``a priori'' probabilities
of a piece of plaintext
actually occurring and the ``a
posteriori'' probabilities
that a given ciphertext
came from the plaintext
.
We will work through an example here. We assume that the message set
is
and the set of possible ciphertexts is
.
Here the letters stands for possible messages and their cipher
equivalents; we aren't so concerned with what the actual messages are.
The transformations are rules that assign to each plaintext one of the
ciphertexts. We are always assuming that these transformations are
one-to-one, which means that two different plaintexts are not mapped
by the same transformation to the same ciphertext. The table below
shows a sample list of possible transformations.
We may now investigate whether or not this abstract cipher system
has perfect security. To do that we must compute
for
each possible plaintext
and ciphertext
.
The key tool
for doing this is Bayes' Formula for computing conditional
probabilities.
Bayes' Formula: Suppose S is a set of possible outcomes and P(S) is the probability that something in S actually occurs. Suppose that T is a subset of the outcomes in S. Then the probability that T occurs given that we know something in S occurs is
![]()
In our case, the set S is the collection of all outcomes in which
the given ciphertext
occurs. The set T is the collection of
all outcomes in which
is the transformation of the plaintext
.
Let's carry this out for
and
.
The ciphertext Xoccurs in three outcomes:
For one more advanced example, lets consider a one-time pad where the stream of key letters is taken from an English text (say, Rebecca of Sunnybrook Farm; see [Follett, 1980]). Let fj be the additive cipher that sends letter number i to letter number i+j, and suppose that we use transformation fj when the key letter is letter number j. If we use letters instead of indices, we might write fA(A)=B, fA(C)=D, fE(H)=M, etc. The probability of fj being chosen is the probability pj of letter number j occurring in English text.
Now me may calculate PA(A) and see if it does indeed equal P(A).
The combinations that lead to the cipher letter A are
Now the interesting question after this is how to exploit lack of perfect security in formulating a method of cryptanalysis.