Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why is the key space for a substitution cipher Factorial N [closed]

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?

like image 764
Frank Thomas Avatar asked Dec 12 '22 20:12

Frank Thomas


1 Answers

That's a bit misleading, both your instructor and Wikipedia are correct. Generally, key of 26 english letters defines a key space sized 2626.

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 2626, because some (most) of the keys aren't possible - e.g., you can't map both A and B to D.

like image 139
SomeWittyUsername Avatar answered Dec 14 '22 09:12

SomeWittyUsername