summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2012-12-07 20:47:51 +0100
committerMatthias Schiffer <mschiffer@universe-factory.net>2012-12-07 20:47:51 +0100
commit9aae1f41775e49e498068bcf38a3110fde536f58 (patch)
treeb8c53a19a5eafcc5f6770c4d90292099ddf42372
parent80db8a2f72e64caa0b16bb995ee98aa10670cb3f (diff)
downloadlibuecc-9aae1f41775e49e498068bcf38a3110fde536f58.tar
libuecc-9aae1f41775e49e498068bcf38a3110fde536f58.zip
Reduce before reciprocation
-rw-r--r--src/ec25519_gf.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/ec25519_gf.c b/src/ec25519_gf.c
index 9c57c66..de9b1a8 100644
--- a/src/ec25519_gf.c
+++ b/src/ec25519_gf.c
@@ -191,6 +191,8 @@ void ecc_25519_gf_recip(ecc_int_256 *out, const ecc_int_256 *in) {
A[i] = in->p[i];
}
+ reduce(A);
+
for (i = 0; i < 32; i++) {
unsigned char c;