Page MenuHomePhabricator

Remove secret-dependant non-constant time operation in ecmult_const.
ClosedPublic

Authored by deadalnix on Feb 29 2020, 16:56.

Details

Summary
  • Remove secret-dependant non-constant time operation in ecmult_const.

ECMULT_CONST_TABLE_GET_GE was branching on its secret input.

Also makes secp256k1_gej_double_var implemented as a wrapper
on secp256k1_gej_double_nonzero instead of the other way
around. This wasn't a constant time bug but it was fragile
and could easily become one in the future if the double_var
algorithm is changed.

  • Clarify comments about use of rzr on ge functions and abs function.

This is a backport of secp256k1 PR709

Test Plan
ninja check-secp256k1

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable