Scalar Multiplication (The Trapdoor)
Scalar Multiplication (The Trapdoor)
Scalar multiplication is the process of adding a point on the curve to itself multiple times. This is the "Trapdoor Function" that makes Bitcoin possible: it is very easy to calculate in one direction, but impossible to reverse.
1. The Core Equation
$$P = d \times G$$
-
$G$ (Generator Point): A fixed starting point on the secp256k1 curve that everyone agrees on.
-
$d$ (Private Key): A massive random integer (the scalar).
-
$P$ (Public Key): The resulting point on the curve.
2. Double-and-Add (The Speed Shortcut)
If your private key is $2^{255}$, you can't just add $G$ to itself $2^{255}$ times (it would take trillions of years). Instead, computers use the Double-and-Add algorithm:
-
Start with $G$.
-
Square/Double the result ($2G, 4G, 8G, 16G...$).
-
Add the results together based on the binary bits of your private key.
-
Efficiency: This allows a computer to perform $2^{256}$ additions in just a few hundred steps.
3. The Discrete Logarithm Problem
If I give you the Public Key ($P$) and the Generator ($G$), you cannot find the Private Key ($d$).
-
In normal math, you would just divide: $d = P / G$.
-
In Elliptic Curve math, Division does not exist.
-
The only way to find $d$ is to try every possible number (brute-force), which is mathematically impossible.
4. The Trapdoor Analogy
Imagine a massive room filled with billiard balls.
-
Forward: You hit the ball a specific number of times ($d$) with perfect precision. It bounces around the room and stops at a specific tile ($P$).
-
Reverse: Someone walks into the room and sees the ball on tile $P$. They have no way of knowing how many times it bounced or where it started.
5. Security Summary
The strength of Bitcoin's security is exactly equal to the difficulty of solving the Elliptic Curve Discrete Logarithm Problem (ECDLP). As of today, there is no known algorithm that can solve this efficiently for the secp256k1 curve.
In the next section, we will analyze why Satoshi chose secp256k1: The Koblitz Curve.
TeachMeBitcoin is an ad-free, open-source educational repository curated by a passionate team of Bitcoin researchers and educators for public benefit. If you found our articles helpful, please consider supporting our hosting and ongoing content updates with a clean donation: