diff options
author | bcook <> | 2016-06-30 02:02:06 +0000 |
---|---|---|
committer | bcook <> | 2016-06-30 02:02:06 +0000 |
commit | 3ce2fddbbb0fbded19721d5da476dfdfecb1e48b (patch) | |
tree | 0ceecace65c38593a01c1d41cce469bd98529f43 /src/lib/libcrypto/rsa/rsa.h | |
parent | eac403b2ae70a8e948d7db823d992cc131392d78 (diff) | |
download | openbsd-3ce2fddbbb0fbded19721d5da476dfdfecb1e48b.tar.gz openbsd-3ce2fddbbb0fbded19721d5da476dfdfecb1e48b.tar.bz2 openbsd-3ce2fddbbb0fbded19721d5da476dfdfecb1e48b.zip |
Remove flags for disabling constant-time operations.
This removes support for DSA_FLAG_NO_EXP_CONSTTIME, DH_FLAG_NO_EXP_CONSTTIME,
and RSA_FLAG_NO_CONSTTIME flags, making all of these operations unconditionally
constant-time.
Based on the original patch by César Pereid. ok beck@
Diffstat (limited to 'src/lib/libcrypto/rsa/rsa.h')
-rw-r--r-- | src/lib/libcrypto/rsa/rsa.h | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/src/lib/libcrypto/rsa/rsa.h b/src/lib/libcrypto/rsa/rsa.h index 4045a6cbf3..d240294809 100644 --- a/src/lib/libcrypto/rsa/rsa.h +++ b/src/lib/libcrypto/rsa/rsa.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: rsa.h,v 1.27 2015/02/14 15:10:39 miod Exp $ */ | 1 | /* $OpenBSD: rsa.h,v 1.28 2016/06/30 02:02:06 bcook 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 | * |
@@ -194,16 +194,6 @@ struct rsa_st { | |||
194 | */ | 194 | */ |
195 | #define RSA_FLAG_NO_BLINDING 0x0080 | 195 | #define RSA_FLAG_NO_BLINDING 0x0080 |
196 | 196 | ||
197 | /* | ||
198 | * The built-in RSA implementation uses constant time operations by default | ||
199 | * in private key operations, e.g., constant time modular exponentiation, | ||
200 | * modular inverse without leaking branches, division without leaking branches. | ||
201 | * This flag disables these constant time operations and results in faster RSA | ||
202 | * private key operations. | ||
203 | */ | ||
204 | #define RSA_FLAG_NO_CONSTTIME 0x0100 | ||
205 | |||
206 | |||
207 | #define EVP_PKEY_CTX_set_rsa_padding(ctx, pad) \ | 197 | #define EVP_PKEY_CTX_set_rsa_padding(ctx, pad) \ |
208 | EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_RSA, -1, EVP_PKEY_CTRL_RSA_PADDING, \ | 198 | EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_RSA, -1, EVP_PKEY_CTRL_RSA_PADDING, \ |
209 | pad, NULL) | 199 | pad, NULL) |