I wrote this series because I am inquisitive about some strange things in the TLS series. Elliptic-curve Diffie–Hellman (ECDHE) is one of them. Please check TLS-part 1 to get the details. So why ECDHE and what is it? Let’s start to explore.

Picture 1. Client Hello message in TLS handshake
Why ECDHE? The reasons are:
- Classic DH requires more key size than ECDHE. For example, a 256-bit elliptic curve key is considered equivalent to a 3072-bit DH key in terms of security
- ECDHE requires less computational resources and bandwidth.
From the picture above, we see ECDHE in some cipher suites. ECDHE uses Elliptic Curve Over Finite Fields to generate the session keys (This is the key we got after the handshake finish in Part 1). What is an Elliptic Curve?
Elliptic Curve
An Elliptic Curve (EC) is a type of algebraic curve that is defined by this formula:

Picture 2. An Elliptic Curve
To play a bit with Elliptic Curve please access this link: Elliptic Curves – GeoGebra
Point Addition

Picture 3. Point Addition
To add P for Q we draw a line from P to Q and intersect with the Elliptic Curve at a point called R then we reflect the R point with the x-axis to get the result S = P + Q.
You can do some Point Addition testing here: Elliptic Curve Sum – GeoGebra
Point Doubling

Picture 4. Point Doubling
When P = Q the result of point addition is S = 2P called point doubling.
Formula
As said at the beginning of this topic, ECDHE uses an Elliptic Curve Over Finite Fields (ECOFF) to generate the session keys so what is the ECOFF? Let’s discuss the next topic. Thanks for reading!