"n = p \\times q \\\\\n\nn = 31 \\times 41 = 1271 \\\\\n\nEuler's\\; totient\\; of \\;n \\\\\n\n\u0278(n) = (p-1)(q-1) \\\\\n\n= 30 \\times 40 = 1200 \\\\\n\ngcd(\u0278(n),e) = gcd(1200,11) = 1 \\\\\n\n1< e<\u0278(n) \\\\\n\nedmod\u0278(n) = 1 \\\\\n\n= ed \\equiv mod\u0278(n) \\\\\n\nd = e^{-1}mod\u0278(n)\n\n11dmod1200 = 1 \\\\\n\nx mod y \\equiv \\frac{x}{y} \\equiv R \\\\\n\n\\frac{11d}{1200} \\\\\n\nR = 1 \\\\\n\nd = 1091"
decryption key d = 1091
Encrypting message M with public key (n,e)
"C = M^emodn \\\\\n\n= 30^{\u02b9\u02b9}mod1200 \\\\\n\nC = 557"
For C = 101 Decrypting with private key (1271, 1091)
"M = C^dmod n \\\\\n\n= 101^{1091}mod1271 = 95 \\\\\n\nd = \\frac{1 + i\u0278(n)}{e}"
If i = 1
"d= \\frac{1 + 1200}{11} = 109.18"
If i = 2
"d= \\frac{1 + 2400}{11} = 218.27"
If i = 10
"d= \\frac{1 + 12000}{11} = 1091"
Comments
Leave a comment