From 1c3aa803c47c84d158b991e900fb6baefe4dce9e Mon Sep 17 00:00:00 2001 From: Dmitry Kovalenko Date: Mon, 16 May 2016 12:41:11 +0200 Subject: [PATCH] Improve readability of mp_exptmod_fast() This closes #58 --- bn_mp_exptmod_fast.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/bn_mp_exptmod_fast.c b/bn_mp_exptmod_fast.c index 8d280bd..8075848 100644 --- a/bn_mp_exptmod_fast.c +++ b/bn_mp_exptmod_fast.c @@ -150,15 +150,15 @@ int mp_exptmod_fast (mp_int * G, mp_int * X, mp_int * P, mp_int * Y, int redmode if ((err = mp_montgomery_calc_normalization (&res, P)) != MP_OKAY) { goto LBL_RES; } -#else - err = MP_VAL; - goto LBL_RES; -#endif /* now set M[1] to G * R mod m */ if ((err = mp_mulmod (G, &res, P, &M[1])) != MP_OKAY) { goto LBL_RES; } +#else + err = MP_VAL; + goto LBL_RES; +#endif } else { mp_set(&res, 1); if ((err = mp_mod(G, P, &M[1])) != MP_OKAY) {