## A Better Secret Decoder Ring

Alice and Betty have been sending secret messages to each other using the secret decoder ring method, but they have a problem. Every once in a while the notes they send to each other pass by Charlie who looks at them. Even though Charlie doesn't know the secret number that Alice and Betty are using, he is pretty smart and he can figure out the messages with a little work. What Charlie knows is that there are only 26 secret numbers (actually 25 since you don't use 0), so by trying all of them he will eventually get the right one. This doesn't take very much time because he can often eliminate a possibility after only checking a few letters because they don't look like an English word.

#### Try to read this secret message, using Charlie's method of trying all possible secret numbers.

INGXROK OY IAZK

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 ...

#### Use the given secret numbers to write the secret messages which correspond to these clear texts.

1. Special secret number 3 and secret number 5. THE MONEY IS IN THE DRAWER.
2. Special secret number 5 and secret number 10. THE QUICK RED FOX JUMPS OVER THE LAZY BROWN DOG.
3. Special secret number 11 and secret number 0. MEET ME AT THREE O CLOCK.

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...

#### Use the given secret numbers to find out what these secret messages say.

1. Special secret number 3 and secret number 5. D OVSK ERFMMZ MDJR IVHLV.
2. Special secret number 5 and secret number 10. SRW I YW K OREKB BEKUTER.
3. Special secret number 11 and secret number 0. K WANB IAKB DYF QMBBSF XAWABKYN.

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!

Secret Message

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".

Answers to making secret messages questions

1. KAR PVSRZ DH DS KAR OEFTRE
2. BTE MGYUI REZ JCV DGSHW CLER BTE NKFA PRCQX ZCO
3. CSSB CS AB BZFSS Y WRYWH
Answers to figuring out secret messages questions

1. I DONT REALLY LIKE BOSCO
2. MRS K IS A GREAT TEACHER
3. I CANT WAIT FOR SUMMER VACATION