Henry G. answered 04/26/25
Math Major at Caltech with Research Experience in Discrete Math
To encrypt YES, you start by finding the numerical values for the letters: Y=24, E=4, S=18 (convention is A=0). Now we encrypt each letter using C=M^e (mod pq). So for the first letter, we have 24^7 (mod 65). See if you can work this out on your own. You should get 54. Do the same for the other two letters, which should become 4 and 47.
To decrypt 50 14, we first need to find the private key d. d*e = 1 mod phi(pq). phi(pq)=(p-1)(q-1)=(5-1)(13-1)=48. So we have that d*7=1 (mod 48). You should quickly see that d=7 is a solution. Now simply decrypt each letter using M=C^d mod 65. For 50, you should get 15 (which is a P), and for 14, you should get 14, which is an O.