Scalar Multiplication

The Generator Point

In ECC, everyone agrees on a starting point called GG, the generator point.

This is just a specific point on the curve that’s been standardized. For Bitcoin’s secp256k1 curve, GG is a fixed point that everyone uses.


Multiplying a Point by a Number

What does 1000G1000G mean?

It means: add GG to itself 1000 times.

This is called scalar multiplication. The scalar (1000) tells us how many times to add.


The Naive Way

To compute 1000G1000G:

  • Start with GG
  • Add GG: 2G2G
  • Add GG: 3G3G
  • … repeat …
  • Add GG: 1000G1000G

This takes 999 additions. Too slow for cryptography.


The Smart Way: Double-and-Add

There’s a much faster method using doubling.


How Double-and-Add Works

Instead of adding GG one at a time, use doubling to jump ahead.

  • G2GG \to 2G (one double)
  • 2G4G2G \to 4G (one double)
  • 4G8G4G \to 8G (one double)
  • … keep doubling …

Each doubling gets you twice as far. By combining doubles and adds cleverly, you can reach any number in roughly log2(k)\log_2(k) steps.

For 1000G1000G: only ~14 operations instead of 999!


Why This Matters

For a 256-bit scalar (like in Bitcoin):

MethodOperations
Naive22562^{256} additions (impossible)
Double-and-add~256 operations (instant)

The double-and-add algorithm makes ECC practical.


The One-Way Property

Here’s what makes ECC secure:

Easy direction:

Given GG and kk, computing kGkG is fast (using double-and-add).

Hard direction:

Given GG and Q=kGQ = kG, finding kk is practically impossible.

This is the Elliptic Curve Discrete Logarithm Problem (ECDLP).

You can multiply forward easily, but you can’t divide backward.