From 7e1ea85f47e48f9cf01a0becd7b63524762b9a5a Mon Sep 17 00:00:00 2001 From: Frank Denis Date: Tue, 22 Dec 2015 09:50:05 +0100 Subject: [PATCH] Remove dead code --- .../curve25519/ref10/curve25519_ref10.c | 24 +++---------------- 1 file changed, 3 insertions(+), 21 deletions(-) diff --git a/src/libsodium/crypto_core/curve25519/ref10/curve25519_ref10.c b/src/libsodium/crypto_core/curve25519/ref10/curve25519_ref10.c index 8d5c11c5..081ebf4d 100644 --- a/src/libsodium/crypto_core/curve25519/ref10/curve25519_ref10.c +++ b/src/libsodium/crypto_core/curve25519/ref10/curve25519_ref10.c @@ -999,19 +999,11 @@ void fe_invert(fe out,const fe z) int i; fe_sq(t0, z); - for (i = 1; i < 1; ++i) { - fe_sq(t0, t0); - } fe_sq(t1, t0); - for (i = 1; i < 2; ++i) { - fe_sq(t1, t1); - } + fe_sq(t1, t1); fe_mul(t1, z, t1); fe_mul(t0, t0, t1); fe_sq(t2, t0); - for (i = 1; i < 1; ++i) { - fe_sq(t2, t2); - } fe_mul(t1, t1, t2); fe_sq(t2, t1); for (i = 1; i < 5; ++i) { @@ -1063,19 +1055,11 @@ void fe_pow22523(fe out,const fe z) int i; fe_sq(t0, z); - for (i = 1; i < 1; ++i) { - fe_sq(t0, t0); - } fe_sq(t1, t0); - for (i = 1; i < 2; ++i) { - fe_sq(t1, t1); - } + fe_sq(t1, t1); fe_mul(t1, z, t1); fe_mul(t0, t0, t1); fe_sq(t0, t0); - for (i = 1; i < 1; ++i) { - fe_sq(t0, t0); - } fe_mul(t0, t1, t0); fe_sq(t1, t0); for (i = 1; i < 5; ++i) { @@ -1113,9 +1097,7 @@ void fe_pow22523(fe out,const fe z) } fe_mul(t0, t1, t0); fe_sq(t0, t0); - for (i = 1; i < 2; ++i) { - fe_sq(t0, t0); - } + fe_sq(t0, t0); fe_mul(out, t0, z); }