Professional Documents
Culture Documents
OVERVIEW
• The first published public-key crypto algorithm was by Diffie & Hellman in 1976 along with the
exposition of public key concepts.
• Based on the fact that it is relatively easy to compute exponents compared to computing
discrete logarithms.
– An eavesdropper cannot determine the shared key based upon this information.
DH Setup
Primitive Elements
• Primitive: A primitive element in a group is an element whose powers exhaust the entire group.
– g is primitive to n, if we can find integers i so that: gi mod n = j, for all values of j, from 1
to n-1. Thus:
– 3 is primitive in the group of units mod 7 because the set of powers of 3 from 1 to 6,
mod 7 = {3,2,6,4,5,1}.
– 2 is not primitive in this group because the set of powers of 2 from 1 to 6, mod 7 =
{2,4,1,2,4,1}.
• Or as there is no exponent e such that 3=2e mod 7.
• mod: modulus.
• Each user generates their private key: x (it should be a large random number)
• Each user computes their shared session key, KAB, as: KAB = axA.xB mod q
• KAB is then used as the session key in a private-key encryption scheme between Alice and Bob.
• Based on their own private key and the public key learned from the other party, Alice and Bob
have computed their secret keys, KA and KB, respectively (and KA = KB = KAB).
D-H Strength
• yA = 32 mod 7 = 2 (Alice)
• yB = 33 mod 7 = 6 (Bob)
– An adversary who can intercept messages and then either relay the intercepted
message or substitute another message.
• D-H is vulnerable to such an attack because it does not authenticate the participants.
– This can be overcome with the use of digital signatures and public-key certificates.
• Suppose Alice and Bob wish to exchange keys, and Darth is the adversary. The attack proceeds
as follows:
– Darth prepares for the attack by generating two random private keys X D1 and XD2, and
then computing the corresponding public keys Y D1 and YD2.