From 9aae1f41775e49e498068bcf38a3110fde536f58 Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Fri, 7 Dec 2012 20:47:51 +0100 Subject: Reduce before reciprocation --- src/ec25519_gf.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src') 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; -- cgit v1.2.3