Click here to see the answer.
Alice and Betty have come up with a better way to make secret messages. It is better in that they hope Charlie won't be able to figure out their messages. The new system uses two secret numbers, one is used just like before (but 0 is now OK to use) and the other is a special secret number. Not all numbers can be used as a special secret number, they have to pick one that they can divide by, mod 26. This means that the special secret number must be an odd number from 1 to 25, but not 13 (the even numbers and 13 all have a greatest common divisor with 26 that is bigger than 1, so you can't divide by them). To make the secret message, they take each letter of the clear text and convert it to a number, then they multiply this number by the special secret number mod 26, then add the ordinary secret number mod 26 and finally convert this back to a letter. Here's the conversion table again:
| A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | Y | Z |
| 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 |
Now suppose that Alice and Betty have picked 5 as the special secret number and 8 as the ordinary secret number. If the clear text starts with CHARLIE IS ... then they would start their secret message this way: "C" = 2, 5×2 mod 26 = 10, 10 + 8 mod 26 = 18 = "S". "H" = 7, 5×7 mod 26 = 35 mod 26 = 9, 9 + 8 mod 26 = 17 = "R". "A" = 0, 5×0 mod 26 = 0, 0 + 8 mod 26 = 8 = "I". "R" = 17, 5×17 mod 26 = 85 mod 26 = 7, 7 + 8 mod 26 = 15 = "P", and so on. Their secret message would thus start out as SRIPLWC WU ...
In order for Alice or Betty to figure out a secret message, they would do the following: For each letter of the secret message, first convert to a number, then subtract the ordinary secret number, then divide by the special secret number, and finally convert back to a letter. If we use 5 as the special secret number and 8 as the ordinary secret number, as before, then working on the secret message SRIPLWC WU ... starting with the "L" (let's pretend we've already done the first four letters) goes like this: "L" = 11, 11 - 8 mod 26 = 3, 3÷5 mod 26 = 11 = "L". "W" = 22, 22 - 8 mod 26 = 14, 14 ÷ 5 mod 26 = 8 = "I". "C" = 2, 2 - 8 mod 26 = 20, 20 ÷ 5 mod 26 = 4 = "E". "U" = 20, 20 - 8 mod 26 = 12, 12 ÷ 5 mod 26 = 18 = "S". So ...LWC WU... becomes ...LIE IS...
Now if Charlie tries to find the secret message without knowing the secret numbers, he will have to try 311 possibilities with this new method instead of just 25 for the old method.(There are 311 because there are 12 possible special secret numbers and 26 secret numbers, so there are 12(26) = 312 possible combinations, but one of these [special secret number 1 and secret number 0] doesn't change the clear text). This is probably too much work for Charlie, so we hope he'll give up trying! If Alice and Betty wanted to make it even harder for Charlie, they could increase the size of the alphabet they are using by adding some punctuation symbols, like ".", "," and "?". With just these 3 additions, there would be 29 "letters" instead of 26. They would do all their clock arithmetic with modulus 29 instead of 26. The number of possibilities for Charlie to try is now 811 with this larger alphabet. Poor Charlie doesn't have a chance!
Try 1, you get "HMFW .... "
Try 2, you get "GLEVP ... "
Try 3, you get "FKDU ... "
Try 4, you get "EJCT ..."
Try 5, you get "DIBSM ..."
When you try secret number 6 you get the message, "CHARLIE IS CUTE".
Return to Questions