summaryrefslogtreecommitdiff
path: root/ecc-ecdsa-sign.c
diff options
context:
space:
mode:
Diffstat (limited to 'ecc-ecdsa-sign.c')
-rw-r--r--ecc-ecdsa-sign.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/ecc-ecdsa-sign.c b/ecc-ecdsa-sign.c
index 4adee1d1..6a41c14c 100644
--- a/ecc-ecdsa-sign.c
+++ b/ecc-ecdsa-sign.c
@@ -46,9 +46,9 @@
mp_size_t
ecc_ecdsa_sign_itch (const struct ecc_curve *ecc)
{
- /* Needs 3*ecc->p.size + scratch for ecc->mul_g. Currently same for
- ecc_mul_g. */
- assert (ecc->p.size + ecc->p.invert_itch <= 3*ecc->p.size + ecc->mul_g_itch);
+ /* Needs 3*ecc->p.size + scratch for ecc_mul_g. */
+ assert (ecc->p.size + ecc->p.invert_itch
+ <= 3*ecc->p.size + ECC_MUL_G_ITCH (ecc->p.size));
return ECC_ECDSA_SIGN_ITCH (ecc->p.size);
}
@@ -79,9 +79,9 @@ ecc_ecdsa_sign (const struct ecc_curve *ecc,
4. s2 <-- (h + z*s1)/k mod q.
*/
- ecc->mul_g (ecc, P, kp, P + 3*ecc->p.size);
+ ecc_mul_g (ecc, P, kp, P + 3*ecc->p.size);
/* x coordinate only, modulo q */
- ecc->h_to_a (ecc, 2, rp, P, P + 3*ecc->p.size);
+ ecc_j_to_a (ecc, 2, rp, P, P + 3*ecc->p.size);
/* Invert k, uses up to 7 * ecc->p.size including scratch (for secp384). */
ecc->q.invert (&ecc->q, kinv, kp, tp);