Diffie-Hellman · The algorithn The values of g and p dont need to be secret Alice then chooses a secret number a Bob also chooses a secret number b Alice and Bob compute ya and yg respectively, which are then exchanged ya -ga mod p yB= moc Both alice and bob can calculate the key as KaR=gab mod p yab mod p( which B can compute) b mod p (which A can compute) The key may then be used in a private-key cipher to secure communications between a and B6 Diffie-Hellman • The algorithm – The values of g and p don’t need to be secret – Alice then chooses a secret number a – Bob also chooses a secret number b – Alice and Bob compute yA and yB respectively, which are then exchanged • yA = ga mod p yB = gb mod p – Both Alice and Bob can calculate the key as • KAB = gab mod p = yA b mod p (which B can compute) = yB a mod p (which A can compute) – The key may then be used in a private-key cipher to secure communications between A and B