diff options
author | miod <> | 2014-07-11 15:01:49 +0000 |
---|---|---|
committer | miod <> | 2014-07-11 15:01:49 +0000 |
commit | 5a4ace6f7e41d55f808ebd46f1be0ae8eecd9a84 (patch) | |
tree | 074432601dae34624f8bd2e4e59de6a74c6f1236 /src | |
parent | 97f86964ea94270cc7945c6c2b2620ea676f1b6b (diff) | |
download | openbsd-5a4ace6f7e41d55f808ebd46f1be0ae8eecd9a84.tar.gz openbsd-5a4ace6f7e41d55f808ebd46f1be0ae8eecd9a84.tar.bz2 openbsd-5a4ace6f7e41d55f808ebd46f1be0ae8eecd9a84.zip |
Apparently better fix for OpenSSL PR #3397 (Joyent bug #7704), from OpenSSL
trunk
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/libcrypto/bn/bn_exp.c | 4 | ||||
-rw-r--r-- | src/lib/libssl/src/crypto/bn/bn_exp.c | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/lib/libcrypto/bn/bn_exp.c b/src/lib/libcrypto/bn/bn_exp.c index 09e32396fb..1aa5503dae 100644 --- a/src/lib/libcrypto/bn/bn_exp.c +++ b/src/lib/libcrypto/bn/bn_exp.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: bn_exp.c,v 1.18 2014/07/11 08:44:47 jsing Exp $ */ | 1 | /* $OpenBSD: bn_exp.c,v 1.19 2014/07/11 15:01:49 miod Exp $ */ |
2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
3 | * All rights reserved. | 3 | * All rights reserved. |
4 | * | 4 | * |
@@ -670,7 +670,7 @@ BN_mod_exp_mont_consttime(BIGNUM *rr, const BIGNUM *a, const BIGNUM *p, | |||
670 | 670 | ||
671 | /* Dedicated window==4 case improves 512-bit RSA sign by ~15%, but as | 671 | /* Dedicated window==4 case improves 512-bit RSA sign by ~15%, but as |
672 | * 512-bit RSA is hardly relevant, we omit it to spare size... */ | 672 | * 512-bit RSA is hardly relevant, we omit it to spare size... */ |
673 | if (window == 5) { | 673 | if (window == 5 && top > 1) { |
674 | void bn_mul_mont_gather5(BN_ULONG *rp, const BN_ULONG *ap, | 674 | void bn_mul_mont_gather5(BN_ULONG *rp, const BN_ULONG *ap, |
675 | const void *table, const BN_ULONG *np, | 675 | const void *table, const BN_ULONG *np, |
676 | const BN_ULONG *n0, int num, int power); | 676 | const BN_ULONG *n0, int num, int power); |
diff --git a/src/lib/libssl/src/crypto/bn/bn_exp.c b/src/lib/libssl/src/crypto/bn/bn_exp.c index 09e32396fb..1aa5503dae 100644 --- a/src/lib/libssl/src/crypto/bn/bn_exp.c +++ b/src/lib/libssl/src/crypto/bn/bn_exp.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: bn_exp.c,v 1.18 2014/07/11 08:44:47 jsing Exp $ */ | 1 | /* $OpenBSD: bn_exp.c,v 1.19 2014/07/11 15:01:49 miod Exp $ */ |
2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
3 | * All rights reserved. | 3 | * All rights reserved. |
4 | * | 4 | * |
@@ -670,7 +670,7 @@ BN_mod_exp_mont_consttime(BIGNUM *rr, const BIGNUM *a, const BIGNUM *p, | |||
670 | 670 | ||
671 | /* Dedicated window==4 case improves 512-bit RSA sign by ~15%, but as | 671 | /* Dedicated window==4 case improves 512-bit RSA sign by ~15%, but as |
672 | * 512-bit RSA is hardly relevant, we omit it to spare size... */ | 672 | * 512-bit RSA is hardly relevant, we omit it to spare size... */ |
673 | if (window == 5) { | 673 | if (window == 5 && top > 1) { |
674 | void bn_mul_mont_gather5(BN_ULONG *rp, const BN_ULONG *ap, | 674 | void bn_mul_mont_gather5(BN_ULONG *rp, const BN_ULONG *ap, |
675 | const void *table, const BN_ULONG *np, | 675 | const void *table, const BN_ULONG *np, |
676 | const BN_ULONG *n0, int num, int power); | 676 | const BN_ULONG *n0, int num, int power); |