Number of Possible Keys for Substitution cipher.
by fortenforge, Jul 6, 2009, 8:42 PM
We know that the Monoalphabetic Substitution Cipher should have a lot more keys than the Caesar Cipher, but how many more?
Ptext: ABCDEFGHIJKLMNOPQRSTUVWXYZ
Ctext: ??????????????????????????
Let's look at the first "?" under the "A" in the ciphertext.
How many choices do we have for that "?". Well, we have
choices because we can choose any letter of the alphabet. Let us say we chose "R".
Ptext: ABCDEFGHIJKLMNOPQRSTUVWXYZ
Ctext: R?????????????????????????
How many choices do we have for the next "?". We can choose any letter of the alphabet except "R", because we have already chosen that for the plaintext letter "A". So we have
choices. Let's say we chose "E". Now for the next question mark we can't chose the letter "R" or "E" so we have
choices. By now you should see the pattern, we have
choices. That is equivalent to
factorial.
.
This is a lot of keys. Much much more keys than a Caesar Cipher. Unfortunately, with today's computers this is not that many keys. But this makes it impossible to try to crack a monoalphabetic substitution cipher using brute force by hand. There is however another method to crack this code...
Ptext: ABCDEFGHIJKLMNOPQRSTUVWXYZ
Ctext: ??????????????????????????
Let's look at the first "?" under the "A" in the ciphertext.
How many choices do we have for that "?". Well, we have

Ptext: ABCDEFGHIJKLMNOPQRSTUVWXYZ
Ctext: R?????????????????????????
How many choices do we have for the next "?". We can choose any letter of the alphabet except "R", because we have already chosen that for the plaintext letter "A". So we have





This is a lot of keys. Much much more keys than a Caesar Cipher. Unfortunately, with today's computers this is not that many keys. But this makes it impossible to try to crack a monoalphabetic substitution cipher using brute force by hand. There is however another method to crack this code...