In: Advanced Math
I need an example of how to solve the Diffie-Hellman protocol if you know Bobs number and the padlock combination but you need to find Alice number
Diffie-Hellman protocol gives us the shared secret key for communication between bob and alice..
the example for this is
Step 1: Let Alice and Bob get public numbers P = 23, G = 9(these are public ones to Alice and Bob) Step 2: Alice selected a private key a = 4 and Bob selected a private key b = 3 Step 3: Alice and Bob compute public values Alice: x =(9^4 mod 23) = (6561 mod 23) = 6 Bob: y = (9^3 mod 23) = (729 mod 23) = 16 Step 4: Alice and Bob exchange public numbers Step 5: Alice receives public key y =16 and Bob receives public key x = 6 Step 6: Alice and Bob compute symmetric keys Alice: ka = y^a mod p = 65536 mod 23 = 9 Bob: kb = x^b mod p = 216 mod 23 = 9 Step 7: 9 is the shared secret key.
finally we got the shared secret key between Bob and Alice by there initial transfer of computed values x,y.
now they can use shared secret key to communicate