[openssl-commits] [openssl] master update

davidben at google.com davidben at google.com
Tue Jul 24 15:54:01 UTC 2018


The branch master has been updated
       via  61ac9fc5c44718bf61ab68328333cc158230d090 (commit)
      from  8937a4ed8ac3fd64be61e9ce7a16bccccf3d2273 (commit)


- Log -----------------------------------------------------------------
commit 61ac9fc5c44718bf61ab68328333cc158230d090
Author: David Benjamin <davidben at google.com>
Date:   Tue Jul 17 13:20:28 2018 -0400

    Remove zero special-case in BN_mod_exp_mont.
    
    A number intended to treat the base as secret should not be branching on
    whether it is zero. Test-wise, this is covered by existing tests in bnmod.txt.
    
    Reviewed-by: Rich Salz <rsalz at openssl.org>
    (Merged from https://github.com/openssl/openssl/pull/6733)

-----------------------------------------------------------------------

Summary of changes:
 crypto/bn/bn_exp.c | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/crypto/bn/bn_exp.c b/crypto/bn/bn_exp.c
index 4e24c94..2c92d7e 100644
--- a/crypto/bn/bn_exp.c
+++ b/crypto/bn/bn_exp.c
@@ -356,11 +356,6 @@ int BN_mod_exp_mont(BIGNUM *rr, const BIGNUM *a, const BIGNUM *p,
         aa = val[0];
     } else
         aa = a;
-    if (BN_is_zero(aa)) {
-        BN_zero(rr);
-        ret = 1;
-        goto err;
-    }
     if (!bn_to_mont_fixed_top(val[0], aa, mont, ctx))
         goto err;               /* 1 */
 


More information about the openssl-commits mailing list