diff options
author | Matthias Schiffer <mschiffer@universe-factory.net> | 2015-10-03 18:57:41 +0200 |
---|---|---|
committer | Matthias Schiffer <mschiffer@universe-factory.net> | 2015-10-03 18:57:41 +0200 |
commit | 89f8a35c713fdcc5ed28c33a003639b93e083b7f (patch) | |
tree | b35dbf386d387edf703e78aaaa4260c358a4674f /src | |
parent | 320daa4838380eff81ab782d4346c29280c1afa3 (diff) | |
download | libuecc-89f8a35c713fdcc5ed28c33a003639b93e083b7f.tar libuecc-89f8a35c713fdcc5ed28c33a003639b93e083b7f.zip |
Remove some unnecessary squeeze() calls
As only the subtrahend in a sub() call needs to be squeezed, the squeeze
can be skipped in these cases.
Diffstat (limited to 'src')
-rw-r--r-- | src/ec25519.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/ec25519.c b/src/ec25519.c index e419a0a..31c00a7 100644 --- a/src/ec25519.c +++ b/src/ec25519.c @@ -546,9 +546,9 @@ void ecc_25519_double(ecc_25519_work_t *out, const ecc_25519_work_t *in) { mult_int(D, 486664, A); add(t1, in->X, in->Y); square(t2, t1); - sub(t3, t2, A); squeeze(t3); + sub(t3, t2, A); sub(E, t3, B); - add(G, D, B); squeeze(G); + add(G, D, B); sub(F, G, C); sub(H, D, B); mult(out->X, E, F); @@ -568,7 +568,7 @@ void ecc_25519_add(ecc_25519_work_t *out, const ecc_25519_work_t *in1, const ecc add(t1, in1->X, in1->Y); add(t2, in2->X, in2->Y); mult(t3, t1, t2); - sub(t4, t3, A); squeeze(t4); + sub(t4, t3, A); sub(E, t4, B); sub(F, D, C); add(G, D, C); |