summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/rsa/rsa.h
diff options
context:
space:
mode:
authorbcook <>2016-06-30 02:02:06 +0000
committerbcook <>2016-06-30 02:02:06 +0000
commitf38e0f193e7bb5faea955cd4afea248b830afa18 (patch)
tree0ceecace65c38593a01c1d41cce469bd98529f43 /src/lib/libcrypto/rsa/rsa.h
parentaa239d08d6dc87fdd121f62e3130aa5d5357cfff (diff)
downloadopenbsd-f38e0f193e7bb5faea955cd4afea248b830afa18.tar.gz
openbsd-f38e0f193e7bb5faea955cd4afea248b830afa18.tar.bz2
openbsd-f38e0f193e7bb5faea955cd4afea248b830afa18.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.h12
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)