I'm trying to solve the task 3.13.2 (b) from the book "Introduction to Cryptography" by Wade Trappe & Lawrence Washington:
Suppose you write a message as a number m (mod 31). Encrypt m as m^7 (mod 31). How would you decrypt? (Hint: Decryption is done by raising the ciphertext to a power mod 31. Fermat's theorem will be useful.)
Any ideas?
Thanks for the help, but I don't quite follow.
So based on this then:
e(m) = m^7 (mod 31)
d(m) = m^13 (mod 31)
Where e() is the encryption function and d() is the decryption function.
If tested with m = 2 this seems to encrypt to 4 and then decrypt back to 2, ok.
However I don't understand how you determined that it should be raised to the power of 13?