# Asymmetric encryption puzzle

I came across this riddle link question:

Bob wanted to send Alice a secret msg m. However, he was concerned about the security. He encrypted his message with a keyword that both of them knew. Several weeks before this, you overheard them exchanging the keyword k = 'EZRA'. Now, Bob has asked you to deliver the letter to Alice. You want to find out what's the letter about. Decrpyt the secret message m using the ciphertext c='MEDMTBJBMAE'.

The answer to this question was HELLO GRAHAM. How could one deduce that without knowing the answer of course.

What can we deduce from the keyword EZRA?

• Seems more appropriate to Puzzling. If you ask it over there, please remove it here, to prevent duplicates. Commented Apr 24, 2020 at 20:34

Convert A = 1, B = 2, ..., Z = 26. Take the difference of (cipher text - key) modulo 26. Extend "EZRA" with itself. The third row is the difference between the first and second rows. There might be an error on 'B' and 'G'.

 M  E  D  M  T  B  J  B  M  A  E
13  5  4 13 20  2 10  2 13  1  5

H  E  L  L  O  G  R  A  H  A  M
8  5 12 12 15  7 18  1  8  1 13

5 26 18  1  5 21 18  1  5 26 18

E  Z  R  A  E  Z  R  A  E  Z  R
5 26 18  1  5 26 18  1  5 26 18

• The text hello graham is not given in the qs. it's the answer. so if i compare the cipher text and ezra, for the second letter, i'll have E(5) vs Z(26). Difference = 21. 21mod26 is 21, which is not E...So how could I reach hello garaham?
– x89
Commented Apr 24, 2020 at 22:32
• @FSJ For first letter: 13 (M) - 5 (E) = 8. 8 % 26 = 8 (H). For second letter: 5 (E) - 26 (Z) = -21. -21 % 26 = 5 (E). Which is E. Your mistake is difference = -21, not 21 (cipher text - key, not key - cipher text). Commented Apr 25, 2020 at 18:18