The Elegance of the Feistel Cipher
Block Ciphers (Pseudorandom Permutations)
After fixing the seed of a PRF, it computes a function from to
. Let's consider the case where in
out. Some functions from
to
are invertible, which leads to the question of whether a PRF might realize such a function and be invertible (with knowledge of the seed). In other words, what if it were possible to determine
when given
and
? While this would be a convenient property, it is not guaranteed by the PRF security definition, even in the case of in
out. A function from
to
chosen at random is unlikely to have an inverse, therefore a PRF instantiated with a random key is unlikely to have an inverse.
A pseudorandom permutation (PRP) - also called a block cipher - is essentially a PRF that is guaranteed to be invertible for every choice of seed. We use both terms (PRP and block cipher) interchangeably. The term "permutation" refers to the fact that, for every , the function
should be a permutation of
. Instead of requiring a PRP to be indistinguishable from a randomly chosen function, we require it to be indistinguishable from a randomly chosen invertible function.
This means we must modify one of the libraries from the PRF definition. Instead of populating the associative array
with uniformly random values, it chooses uniformly random but distinct values. As long as
gives distinct outputs on distinct inputs, it is consistent with some invertible function. The library guarantees distinctness by only sampling values that it has not previously assigned. Thinking of an associative array
as a key-value store, we use the notation
.values to denote the set of values stored in
.
Definition 6.6 (PRP syntax)
Let be a deterministic function. We refer to blen as the blocklength of
and any element of
as a block.
We call a secure pseudorandom permutation (PRP) (block cipher) if the following two conditions hold:
1. (Invertible given ) There is a function
satisfying
for all
and all
". values" refers to the set
.