(programming required) Encryption and decryption. For encryption, given a public key he, ni and a message m ∈ Zn, compute the corresponding ciphertext c := me mod n. Similarly, for decryption: given a private key hd, ni and a ciphertext c ∈ Zn, compute m := c d mod n. (Hint: Exercise 7.25 will be helpful.)
Exercise 7.25
(programming required) Implement mod-exp in a programming language of your choice. Also implement a version of mod-exp that computes b e and then, after that computation is complete, takes the result mod n. Compare the speeds of these two algorithms in computing 3k mod 5, for k = 80, k = 800, k = 8000, . . . , k = 8,000,000. Explain.
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here