Q1. Let p be a prime and (alpha) be a primitive root modulo p. The ElGamal public-key cipher ((M, C, K_e, K_d, E_{k_e}, D_{k_d})) is defined as follows: (ullet) (M = mathbb{Z}_p^* = {1, 2, 3, dots, p - 1}), (C = mathbb{Z}_p^* imes mathbb{Z}_p^*), (K_e = {p} imes {alpha} imes mathbb{Z}_p^*), (K_d = mathbb{Z}_{p-1}). A user first chooses a random number u in (mathbb{Z}_{p-1}) as his private key (k_d := u), then publicizes his public key (k_e = (p, alpha, eta)), where (eta = alpha^u mod p). To encrypt a message x with a public key (k_e = (p, alpha, eta)), one picks up a (secret) random number (v in mathbb{Z}_{p-1}), and then does the encryption as follows: (E_{k_e}(x, v) = (y_1, y_2)), where (y_1 = alpha^v mod p), and (y_2 = xeta^v mod p). When the receiver receives the ciphertext ((y_1, y_2) in mathbb{Z}_p^* imes mathbb{Z}_p^*), he does the decryption as follows: (D_{k_d}(y_1, y_2) = y_2 left(y_1^{k_d} ight)^{-1} mod p), where (left(y_1^{k_d} ight)^{-1}) denotes the multiplicative inverse of (y_1^{k_d}) modulo p. Prove that the decryption process above is correct. 20 marks
Added by Veronica M.
Close
Step 1
Then, we calculate y1 = a^v mod p and y2 = xB^v mod p. Show more…
Show all steps
Your feedback will help us improve your experience
Akash M and 83 other AP CS educators are ready to help you.
Ask a new question
Labs
Want to see this concept in action?
Explore this concept interactively to see how it behaves as you change inputs.
Key Concepts
Recommended Videos
Bob knows that the ElGamal cryptosystem is similar to Diffie-Hellman. To generate the ElGamal keys, Bob selects the cyclic group Z*_p with prime p = 20876441 and generator g = 5 as the public parameters (in decimal). Bob also selects his secret key X between 1 and p-1. The public parameters are p, g, and the value h = g^X mod p, while the private parameter is X. Bob's ElGamal encryption uses a random nonce Y between 1 and p-1 and for a given message M between 1 and p-1, and it outputs a pair of values (C1, C2), so that C1 = g^Y mod p, and C2 = M*(h^Y) mod p. This pair of values is the ciphertext for M with nonce Y (i.e., the ciphertext is a tuple). Also, the value "h^Y mod p" is called the "shared secret" of Bob. Bob's ElGamal decryption receives ciphertext (C1, C2) and his secret key X as input and multiplies C2 with the modular multiplicative inverse of the shared secret. Specifically, if "D = C1^X = g^(X*Y) mod p" is the shared secret, and "E = D^(-1) mod p" is the modular multiplicative inverse of the shared secret, the plaintext is "M = E*C2 mod p". Bob notices that ElGamal encryption is malleable. If the encryption of M3 = 12345 is (C1, C2) = (8698838, 17288353), what is the encryption of M4 = 382695 (all numbers are decimal)? Show all your work.
Adi S.
In the Diffie-Hellman key exchange protocol, Alice and Bob choose a large prime p and a primitive root g for p. As usual, Alice sends A ≡ g^a (mod p) to Bob, and Bob sends B ≡ g^b (mod p) to Alice. Suppose Oscar bribes Bob to tell him the values of p, b and B. Bob soon regrets it and doesn't tell him the value of g. Show how Oscar can determine g from his knowledge of p, b and B, provided that gcd(b, p - 1) = 1. Hint: Obviously, Oscar attended all Cryptography classes, and therefore knows a little about Fermat.
Recommended Textbooks
Computer Science and Information Technology
Introduction to Programming Using Python
Computer Science - An Overview
Transcript
Watch the video solution with this free unlock.
EMAIL
PASSWORD