TeachMeBitcoin

Scalar Multiplication (The Trapdoor)

From TeachMeBitcoin, the free encyclopedia Reading time: 2 min

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$$

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:

  1. Start with $G$.

  2. Square/Double the result ($2G, 4G, 8G, 16G...$).

  3. Add the results together based on the binary bits of your private key.

  4. 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$).

4. The Trapdoor Analogy

Imagine a massive room filled with billiard balls.

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.

☕ Help support TeachMeBitcoin

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:

Ethereum: 0x578417C51783663D8A6A811B3544E1f779D39A85
Bitcoin: bc1q77k9e95rn669kpzyjr8ke9w95zhk7pa5s63qzz
Solana: 4ycT2ayqeMucixj3wS8Ay8Tq9NRDYRPKYbj3UGESyQ4J
Address copied to clipboard!