Diffie-Hellman is a key exchange algorithm based on public key cryptography written by Diffie and Hellman
Diffie-Hellman Algorithm First we have to know the concept “Primitive root of a prime number” ,a primitive root x of a prime number p means : \(x \ mod(p), x^{2} mod(p), x^{3} mod(p),…, x^{p-1}mod(p)\) generates numbers from 1 to p-1.
In Diffie-Hellman algorithm there are two numbers
1- Prime number \(q\).
2- Primitive root of \(q = a\).