2

My understanding of an ideal block cipher is as follows:

For a block cipher with block size $n$, there are $2^n$ possible plaintexts. The number of possible keys (mappings) would then be $2^n!$.

The size of a single key would then be $2^n$ because you're choosing one full permutation from the set of all possible permutations.

EDIT: Now that I think about it some more, the key size would be the required number of bits to express the number of possible permutations. So for 24 permutations, that would be a 5-bit key size. For 40,320 permutations, that would be a 16-bit key size.

Is this correct?

kelalaka
  • 49,797
  • 12
  • 123
  • 211
Bastien
  • 521
  • 4
  • 12

1 Answers1

2

Ideally, each key $k$ select a permutation of all possible permutations $2^n!$ for a block cipher with block size $n$. So when we say 128-bit key we expect that they represent $2^{128}$ permutations from possible ones. Some keys might be very bad, maybe just inverting the plaintext or some acts as a counter, we don't know.

Your calculations are correct if the random selection has no collisions, i.e. there may be two keys that represent the same permutations. We don't expect this collision since $2^{128}$ is very small compared to $2^n!$.

In general, we don't talk about the number of permutations that the key-size represents. We talk about the provided security by key length in bits.

kelalaka
  • 49,797
  • 12
  • 123
  • 211