# Math Help - Encryption

1. ## Encryption

J is encrypted as S and S is encrypted as N encryption map y congruen(ax+b)mod 26,decryption map x congruent(cy+d) mod 26

HKHYKXOOB NTHPKYHNYN EHE KVY YXDP YWP TVKTPGY VA IOXTD WVOPN NPCHVJNOB

2. Originally Posted by garshan

J is encrypted as S and S is encrypted as N encryption map y congruen(ax+b)mod 26,decryption map x congruent(cy+d) mod 26

HKHYHXOOB NTHPKYHNYN EHE KVY YXDP YWP TVKTPGY VA IOXTD WVOPN NPCHVJNOB
Number the letters of the alphabet from 0 to 25 (not 1 to 26), so J is 9, S is 18, N is 13.

In the decryption map, x goes to cx + d (mod 26). We know that 18 goes to 9, and 13 goes to 18. So $9\equiv18c+d\!\!\!\pmod{26}$ and $18\equiv13c+d\!\!\!\pmod{26}$. Solve these simultaneous equations (mod 26) by subtracting the first from the second, to get $9\equiv21c\!\!\!\pmod{26}$, or $3\equiv7c\!\!\!\pmod{26}$, which has the solution c=19. Substitute c=19 into the first equation and you find d=5.

Thus the decryption algorithm sends x to 19x + 5. So it sends A (=0) to F (=5). Then it sends B to Y, C to R and so on, going 19 letters forward (or equivalently 7 letters backwards) each time. That should enable you to decrypt the message. (But note that there is an error in the fifth letter of the message, which should be H, not K.)

3. Sorry for the 2 year delay in getting back.

but thanks for the help Opalg it worked out great