Diffie Hellman Key Exchange Algorithm For Key Generation
Diffie Hellman Key Exchange Algorithm For Key Generation
cryptography based on the algebra structure of elliptic curves over finite fields. The DH also uses
the trapdoor function, just like many other ways to do public-key cryptography. The simple idea
1. The first party picks two prime numbers, g and p and tells them to the second party.
2. The second party then picks a secret number (let’s call it a), and then it computes
ga mod p and sends the result back to the first party; let’s call the result A. Keep in mind
that the secret number is not sent to anyone, only the result is.
3. Then the first party does the same; it selects a secret number b and calculates the
5. The second party takes the received number B and calculates B a mod p
6. The first party takes the received number A and calculates A b mod p
This is where it gets interesting; the answer in step 5 is the same as the answer in step 4.
This means both parties will get the same answer no matter the order of exponentiation.
(ga mod p)b mod p = gab mod p
The number we came within steps 4 and 5 will be taken as the shared secret key. This
key can be used to do any encryption of data that will be transmitted, such as
q: q is a prime number
Example
2. Alice selected private key a = 4, and Bob selected b = 3 as the private key
3. Both Alice and bob now calculate the value of x and y as follows:
4. Now, both Alice and Bob exchange public numbers with each other.
Encryption: The Diffie Hellman key exchange algorithm can be used to encrypt;
middle attack. This key Agreement can be in the form of Diffie-Hellman. Secure
Forward Secrecy: Forward secrecy-based protocols can generate new key pairs
for each new session, and they can automatically discard them when the session
is finished. In these forward Secrecy protocols, more often than not, the Diffie
an insecure channel.
Since it doesn’t authenticate any party in the transmission, the Diffie Hellman key