Replay the remaining bits of q, from high index to low index.
Equations
Instances For
Calculate q • Q by binary doubling and addition modulo n, verifying
the supplied inverse for every division. Return the resulting point and any
unused inverses, or none if a required arithmetic check fails.
Equations
- Hex.ECPP.replay n a b q Q inverses = Hex.ECPP.replayBits n a b q Q (HexArith.bitLength q) Hex.ECPP.Point.infinity inverses
Instances For
Verify q • Q = O modulo n, with every supplied inverse used exactly
once. The certificate for q and the curve's nonsingularity are checked
separately by check.
Equations
- Hex.ECPP.replayDone n a b q Q inverses = match Hex.ECPP.replay n a b q Q inverses with | some (Hex.ECPP.Point.infinity, []) => true | x => false
Instances For
Every point returned by an accepted replay prefix is a canonical point on the supplied curve. The induction follows the actual bit schedule.
Check the auxiliary prime size needed for the Hasse-bound argument.
For q ≥ 2, this is the exact integer form of
q > (n^(1/4) + 1)²: require n < (q - 1)² and
16*n*q < ((q - 1)² - n)². Strict inequalities are necessary to exclude
a prime divisor of n at most √n.