I'm taking a crypto course, and we're going over substitution ciphers and their Key space. per the instructor, the key space is 26! (approx 2^88) for the English alphabet. there is no reference to key length, probably because a subst cipher's length would be a function of the length of the alphabet, just as the number of options would.
per wikipedia the keyspace is the set of all possible keys of a certian length, and is calculated in the same way brute force try counts would be options^length or in this case 26^26.
so what am I not getting here?
That's a bit misleading, both your instructor and Wikipedia are correct.
Generally, key of 26 english letters defines a key space sized 26
26
.
For substitution ciphers over english alphabet 26!
is the correct number representing the key space. That's because for substitution cipher the key is defined as a unique replacement of each letter with another one, e.g. A -> D, B -> M, C -> Y, etc.
26 letters --> key can be any permutation of 26-letter set --> 26!
. Due to the uniqueness required for substitution, the key space is effectively smaller than the maximal 26
26
, because some (most) of the keys aren't possible - e.g., you can't map both A and B to D.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With