Comment and check a parameter for inf in secp256k1_ecmult_const.
This commit is contained in:
parent
6c0be857f8
commit
099bad945e
@ -14,6 +14,7 @@
|
|||||||
* Multiply: R = q*A (in constant-time)
|
* Multiply: R = q*A (in constant-time)
|
||||||
* Here `bits` should be set to the maximum bitlength of the _absolute value_ of `q`, plus
|
* Here `bits` should be set to the maximum bitlength of the _absolute value_ of `q`, plus
|
||||||
* one because we internally sometimes add 2 to the number during the WNAF conversion.
|
* one because we internally sometimes add 2 to the number during the WNAF conversion.
|
||||||
|
* A must not be infinity.
|
||||||
*/
|
*/
|
||||||
static void secp256k1_ecmult_const(secp256k1_gej *r, const secp256k1_ge *a, const secp256k1_scalar *q, int bits);
|
static void secp256k1_ecmult_const(secp256k1_gej *r, const secp256k1_ge *a, const secp256k1_scalar *q, int bits);
|
||||||
|
|
||||||
|
@ -168,6 +168,7 @@ static void secp256k1_ecmult_const(secp256k1_gej *r, const secp256k1_ge *a, cons
|
|||||||
* that the Z coordinate was 1, use affine addition formulae, and correct
|
* that the Z coordinate was 1, use affine addition formulae, and correct
|
||||||
* the Z coordinate of the result once at the end.
|
* the Z coordinate of the result once at the end.
|
||||||
*/
|
*/
|
||||||
|
VERIFY_CHECK(!a->infinity);
|
||||||
secp256k1_gej_set_ge(r, a);
|
secp256k1_gej_set_ge(r, a);
|
||||||
secp256k1_ecmult_odd_multiples_table_globalz_windowa(pre_a, &Z, r);
|
secp256k1_ecmult_odd_multiples_table_globalz_windowa(pre_a, &Z, r);
|
||||||
for (i = 0; i < ECMULT_TABLE_SIZE(WINDOW_A); i++) {
|
for (i = 0; i < ECMULT_TABLE_SIZE(WINDOW_A); i++) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user