diff options
author | Niels Möller <nisse@lysator.liu.se> | 2019-12-25 11:33:08 +0100 |
---|---|---|
committer | Niels Möller <nisse@lysator.liu.se> | 2019-12-25 11:33:08 +0100 |
commit | d4c3e2ee91ddd992ae155b9375e6bc25e98b22f1 (patch) | |
tree | 0f017ecca3110f54d7c03d93fb0e8c2fc7df7b23 /ecc-mul-a-eh.c | |
parent | 923cc6ae98fc1da9cbd98ba8f8fcaf5240967221 (diff) | |
download | nettle-d4c3e2ee91ddd992ae155b9375e6bc25e98b22f1.tar.gz |
Use add_hh rather than add_hhh for ecc_mul_a_eh.
* ecc-mul-a-eh.c (ecc_mul_a_eh) [ECC_MUL_A_EH_WBITS == 0]: Use
add_hh rather than add_hhh.
(table_init) [[ECC_MUL_A_EH_WBITS > 0]: Likewise.
* ecc-internal.h (ECC_MUL_A_EH_ITCH) [ECC_MUL_A_EH_WBITS == 0]:
Reduced from 13*n to 12*n.
Diffstat (limited to 'ecc-mul-a-eh.c')
-rw-r--r-- | ecc-mul-a-eh.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/ecc-mul-a-eh.c b/ecc-mul-a-eh.c index e9b22cd4..d7765ebf 100644 --- a/ecc-mul-a-eh.c +++ b/ecc-mul-a-eh.c @@ -39,7 +39,7 @@ #include "ecc-internal.h" /* Binary algorithm needs 6*ecc->p.size + scratch for ecc_add_ehh, - total 13 ecc->p.size + total 12 ecc->p.size Window algorithm needs (3<<w) * ecc->p.size for the table, 3*ecc->p.size for a temporary point, and scratch for @@ -76,7 +76,7 @@ ecc_mul_a_eh (const struct ecc_curve *ecc, int digit; ecc->dup (ecc, r, r, scratch_out); - ecc->add_hhh (ecc, tp, r, pe, scratch_out); + ecc->add_hh (ecc, tp, r, pe, scratch_out); digit = (w & bit) > 0; /* If we had a one-bit, use the sum. */ @@ -108,7 +108,7 @@ table_init (const struct ecc_curve *ecc, for (j = 2; j < size; j += 2) { ecc->dup (ecc, TABLE(j), TABLE(j/2), scratch); - ecc->add_hhh (ecc, TABLE(j+1), TABLE(j), TABLE(1), scratch); + ecc->add_hh (ecc, TABLE(j+1), TABLE(j), TABLE(1), scratch); } } |