In class we discussed a cipher based on remainder arithmetic. Here's how it worked.
Given a plaintext message, say the word "fab", first
convert the letters into numbers using the following table:
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
2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
The word fab turns into the numbers 7, 2, 3.
Then use the following encryption formula encrypt the numbers:
y = xe mod p
For this formula p should be a prime number bigger than the biggest number in our table above.
In class we picked p = 29. The encryption exponent e must be a number between 1 and p-1
such that gcd(e, p-1) = 1. In class we picked e = 3.
To encrypt the numbers 7, 2, 3, we take the number for each letter and plug it in for x to get y.
Now, f is 7 so we compute 73 mod 29. Since 73 = 343 and dividing 343
by 29 leaves a remainder of 24, we see that 7 encrypts to 24.
Likewise, a is 2 so we compute 23 mod 29. Since 23 = 8 and dividing 8
by 29 leaves a remainder of 8, we see that 2 encrypts to 8.
Finally, b is 3 so we compute 33 mod 29. Since 33 = 27 and dividing 27
by 29 leaves a remainder of 27, we see that 3 encrypts to 27.
Thus encrypting "fab" gives a ciphertext of 24, 8, 27.
Problem [1]: Encrypt the word "Hello" using the procedure described
above (i.e., using the cipher described above).
You can use this
web page
to do the arithmetic for you.