3.5 Example Generation of a key: p and a are randomly generated, g is a primitive root of p appropriate. p = 2357 g = 2 a = 1751 g^a mod p = 2^1751 (mod 2357) ≡1185 The public key is now P = (p ← 2357, g ← 2, g^a ← 1185), the secret key is a. Encrypt a message m = 2035 is as follows (k is randomly chosen): k = 1520 γ = 2^1520 (mod 2357) ≡ 1430 δ ≡ 2035 x 1185^1520 (mod 2357) ≡ 697 c = (γ ← 1430, δ ← 697) The ciphertext, c, is then sent to the recipient. We can then calculate m from this. the message is calculated by: m ≡ 1430^(2357-1-1751) x 697 ≡ 872 x 697 (mod 2357) ≡ 2035