diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2014-07-11 15:01:50 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2014-07-11 15:01:50 +0000 |
commit | 248c4240908f8271e86bf84d71a706131de34c5d (patch) | |
tree | f43a960fdc1e39c2938353b800d09fcacfa0d1cb /lib | |
parent | 58f4576cda8cd29db16f2b035fab0c7229487c48 (diff) |
Apparently better fix for OpenSSL PR #3397 (Joyent bug #7704), from OpenSSL
trunk
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libcrypto/bn/bn_exp.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libcrypto/bn/bn_exp.c b/lib/libcrypto/bn/bn_exp.c index 09e32396fb7..1aa5503daec 100644 --- a/lib/libcrypto/bn/bn_exp.c +++ b/lib/libcrypto/bn/bn_exp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bn_exp.c,v 1.18 2014/07/11 08:44:47 jsing Exp $ */ +/* $OpenBSD: bn_exp.c,v 1.19 2014/07/11 15:01:49 miod Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -670,7 +670,7 @@ BN_mod_exp_mont_consttime(BIGNUM *rr, const BIGNUM *a, const BIGNUM *p, /* Dedicated window==4 case improves 512-bit RSA sign by ~15%, but as * 512-bit RSA is hardly relevant, we omit it to spare size... */ - if (window == 5) { + if (window == 5 && top > 1) { void bn_mul_mont_gather5(BN_ULONG *rp, const BN_ULONG *ap, const void *table, const BN_ULONG *np, const BN_ULONG *n0, int num, int power); |