Sitemap
Press enter or click to view image in full size
ASecuritySite.com OpenSSL for the Diffie Hellman Method: [here]

Member-only story

How To Avoid A Log Jam: Diffie-Hellman and OpenSSL

3 min readJan 3, 2023

--

The Diffie-Hellman (DH) method is perhaps one of the greatest inventions in Cybersecurity and was created by Whitfield Diffie and Marty Hellman. With the DH method, Bob creates a random value (b) and Alice also creates a random value (a). Next Bob computes B=g^b (mod p) and sends it to Alice. Alice computes A=g^a (mod p) and sends this to Bob. Bob raises the value of A to the power of b and takes (mod p), and Alice raises B to the power of a and takes (mod p). In the end, they will have the same shared value — g^{ab} (mod p). This can then be used to derive an encryption key that they can use for a secure tunnel (Figure 1). Overall, p is the large prime number, and also known as the shared modulus between Bob and Alice.

Press enter or click to view image in full size
Figure 1

In the paper “Imperfect Forward Secrecy: How Diffie-Hellman Fails in Practice” [here][1], the authors define a range of prime numbers which are used for TLS key exchange for Diffie-Hellman key exchange:

Press enter or click to view image in full size

If these are used, then an adversary can compile a list of keys for a range of…

--

--

Prof Bill Buchanan OBE FRSE
Prof Bill Buchanan OBE FRSE

Written by Prof Bill Buchanan OBE FRSE

Professor of Cryptography. Serial innovator. Believer in fairness, justice & freedom. Based in Edinburgh. Old World Breaker. New World Creator. Building trust.