Download presentation
Presentation is loading. Please wait.
1
DHKE Example ABDULAZIZ A. HAMEDA
2
DHKE: Set-up Choose a large prime p. Choose a primitive root g of p.
Publish p and g Alice and Bob must agree on the values of p and g; (where g for example is 2 or 5).
3
DHKE: Steps Alice Bob gA mod p gB mod p y y = AESkAB(x)
Choose random private key kprA=A ∈{1,2,…,p-1} Choose random private key kprB=B ∈ {1,2,…,p-1} Compute corresponding public key kpubA= gA mod p gA mod p Compute correspondig public key kpubB= gB mod p gB mod p Compute common secret kAB = (gB mod p)A = gAB mod p Compute common secret kAB = (gA mod p)B = gBA mod p We can now use the joint key kAB for encryption, e.g., with AES y y = AESkAB(x) x = AES-1kAB(y)
4
Domain parameters p=29, g=2
DHKE: Example Alice Domain parameters p=29, g=2 Bob Choose random private key kprA= A = 5 Choose random private key kprB=B = 12 Compute corresponding public key kpubA= 25 mod 29 = 3 3 Compute corresponding public key kpubB= 212 mod 29 = 7 7 Compute common secret kAB = 75 mod 29 = 16 Compute common secret kAB = 312 mod 29 = 16 Proof of correctness: Alice computes: (gb)a mod p. Bob computes: (ga)b mod p.
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.