diff options
author | Niels Möller <nisse@lysator.liu.se> | 2020-11-01 10:22:48 +0100 |
---|---|---|
committer | Niels Möller <nisse@lysator.liu.se> | 2020-11-01 10:22:48 +0100 |
commit | 172448b05931e791ce3470b45afe8de4cdffaaad (patch) | |
tree | cd7d238a5ba07568c71619a9bb7819e107cfe205 /eddsa-sign.c | |
parent | 98402b3b32b346a568c0d0d8e56a64f27116250c (diff) | |
download | nettle-172448b05931e791ce3470b45afe8de4cdffaaad.tar.gz |
Separate result area for ecc_mod_mul and ecc_mod_sqr.
* ecc-mod-arith.c (ecc_mod_mul, ecc_mod_sqr): Separate argument
for scratch area, reducing required size of result area. Update
all callers to naïvely keep using result in scratch area.
(ecc_mod_pow_2k, ecc_mod_pow_2k_mul): Simplified, also reducing
required size of result area.
Diffstat (limited to 'eddsa-sign.c')
-rw-r--r-- | eddsa-sign.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/eddsa-sign.c b/eddsa-sign.c index f8bdf255..c1a23cd7 100644 --- a/eddsa-sign.c +++ b/eddsa-sign.c @@ -91,7 +91,7 @@ _eddsa_sign (const struct ecc_curve *ecc, eddsa->digest (ctx, 2*nbytes, hash); _eddsa_hash (&ecc->q, hp, 2*nbytes, hash); - ecc_mod_mul (&ecc->q, sp, hp, k2); + ecc_mod_mul (&ecc->q, sp, hp, k2, sp); ecc_mod_add (&ecc->q, sp, sp, rp); /* FIXME: Can be plain add */ if (ecc->p.bit_size == 255) { |