liveBook · Manning

Double-and-add algorithm

As explained in Elliptic Curve Cryptography for Developers

The double-and-add algorithm computes scalar multiplication using repeated point doubling and conditional point addition while processing the scalar's binary representation.

The double-and-add algorithm computes point multiplication Q = kP without adding P to itself k times. It scans the binary representation of k from the most significant bit: each bit position doubles the current point, then a set bit adds the original point. section 3.1.4

A typical implementation follows this execution flow:

  • Initialize the running result R with P. section 13.2.6
  • Determine the remaining bit positions of k and process them from high to low. section 3.1.4 section 13.2.6
  • Double R using the point-addition routine, test the current bit, and add P when the bit is set. section 13.2.6
  • Copy R to the destination and clear the local temporary point. section 13.2.6
Figure 3.5 Double and add method
figure

Follow the bit-by-bit flow of the double-and-add method. section 3.1.4

The same addition routine handles both doubling and adding, while input and output checks account for the point at infinity. This uniformity improves resistance to power-consumption side-channel attacks on embedded systems, although it can be slightly slower. section 3.1.4 section 3.6

How Elliptic Curve Cryptography for Developers covers it

How deep it goes
Explains binary traversal and implementation flow, then stops short of surveying alternative multiplication methods.
Examples
Uses a double-and-add figure and a polynomial elliptic-curve multiplication listing as concrete implementation artifacts.
What it assumes
Assumes point addition and binary scalars while establishing repeated addition, doubling, and the point at infinity.
What you can do after
Apply it via a point-addition routine to compute large scalar multiples over ordinary or extension-field curves.
How it connects
Connects point multiplication with point addition, finite fields, the point at infinity, and side-channel attacks.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Elliptic Curve Cryptography for Developers. The section links point to the parts of the book it draws on.