2021-03-13 Niels Möller <nisse@lysator.liu.se>
+ * ecc-ecdsa-sign.c (ecc_ecdsa_sign): Ensure s output is reduced to
+ canonical range.
+
* ecc-ecdsa-verify.c (ecc_ecdsa_verify): Use ecc_mod_mul_canonical
to compute the scalars used for ecc multiplication.
* testsuite/ecdsa-verify-test.c (test_main): Add test case that
ecc_mod_mul (&ecc->q, tp, zp, rp, tp);
ecc_mod_add (&ecc->q, hp, hp, tp);
- ecc_mod_mul (&ecc->q, tp, hp, kinv, tp);
+ ecc_mod_mul_canonical (&ecc->q, sp, hp, kinv, tp);
- mpn_copyi (sp, tp, ecc->p.size);
#undef P
#undef hp
#undef kinv