In this post, we’ll walk through the math behind ECC using tiny numbers, and explain point addition and point multiplication step by step. You don’t need to be a math genius — just a curious mind. Let’s get started!
🧠 What Is ECC?
ECC is a way to create secure keys using math on something called an elliptic curve. It’s used everywhere — from websites to mobile apps to cryptocurrencies.
Instead of multiplying huge prime numbers like RSA, ECC uses points on a curve and special arithmetic.
📐 Step 1: Define an Elliptic Curve
We’ll use a simple curve for this example, defined over a finite field (mod 17):
This means we only work with whole numbers from 0 to 16, and everything wraps around at 17 (modular arithmetic).
📌 Step 2: Pick a Base Point G
A base point is a valid point on the curve that everyone agrees on. Let’s use:
G = (5, 1)
✅ This point satisfies the curve equation.
🔑 Step 3: Choose a Private Key d
This is just a number that you keep secret:
d = 7
Your public key will be:
Q = d × G
This means: add point G to itself 7 times — known as point multiplication.
➕ Point Addition and Doubling — The Core of ECC
📏 When adding two different points P and Q:
If and :
🔁 When adding a point to itself (doubling):
Use modular inverses instead of direct division!
🧮 Step-by-Step: 7 × (5, 1)
Let’s walk through the math to compute:
Q = 7 × G = 7 × (5,1)
We’ll use the curve:
Step 1: 2G = (5,1) + (5,1)
- Use point doubling
- Result: (6,3)
Step 2: 3G = (6,3) + (5,1)
- Result: (10,6)
Step 3: 4G = (10,6) + (5,1)
- Result: (3,1)
Step 4: 5G = (3,1) + (5,1)
- Result: (9,16)
Step 5: 6G = (9,16) + (5,1)
- Result: (16,13)
Step 6: 7G = (16,13) + (5,1)
- Result: ✅ (0,6)
So:
Public Key Q = (0, 6)
🔐 Why Point Multiplication Is Secure
Multiplying a point like:
Q = d × G
is easy to do (as we just saw).
But going backwards — trying to find d from Q and G — is extremely hard. That problem is called the Elliptic Curve Discrete Logarithm Problem (ECDLP), and it’s what makes ECC secure.
With real-world keys, d is a 256-bit number, and G is a point on a massive curve. That means you’d need trillions of years to guess d.
🧠 Recap
| Concept | Meaning |
|---|---|
| Curve Equation | y² = x³ + ax + b mod p |
| Base Point (G) | A fixed point everyone uses |
| Private Key (d) | Your secret number |
| Public Key (Q) | Q = d × G, shared publicly |
| Point Multiplication | Add G to itself d times using ECC rules |
📎 Final Thoughts
ECC may be built on math, but its power lies in beautiful simplicity. With just a few operations — modular arithmetic, curve equations, and point addition — we create security that protects billions of devices worldwide.
Thanks for clear explanation!