# Diffie Helman Key Exchange Protocol Problem statement: Alice and Bob would like to share a secret number without revealing it to Bob. let's assume Alice and Bob have already announced to the world that they will be using a group with generator g of size N. (public information) Now Alice chooses a random number a in [0..N-1] and Bob choose another random number b in [0..N-1] Alice sends Bob the number g^a Bob sends Alice the number g^b Even though Eve can capture both these messages he will not be able to get back a & b because to know that he has to solve the discrete log problem, which is computationally a hard problem. let X = g^a a = log(g) X in module N once both Alice receives g^b, she raises it to the power by b. i.e the common_secret_number = (g^b)^a = g^(a+b) similarly Bob does the same