summaryrefslogtreecommitdiff
path: root/lib/libcrypto/dh
diff options
context:
space:
mode:
authorTheo Buehler <tb@cvs.openbsd.org>2018-11-05 23:46:17 +0000
committerTheo Buehler <tb@cvs.openbsd.org>2018-11-05 23:46:17 +0000
commit36b29cbae60cfbe22aab6c159f407e26fe98d353 (patch)
tree333c8b01851cd818a08303f9841669a7bc7d6457 /lib/libcrypto/dh
parent4e4a8659261a6f2892b3ad9c2be40d19441ba1b8 (diff)
Remove two unnecessary BN_FLG_CONSTTIME dances: BN_mod_exp_ct() already
takes care of this internally. ok beck jsing
Diffstat (limited to 'lib/libcrypto/dh')
-rw-r--r--lib/libcrypto/dh/dh_key.c16
1 files changed, 4 insertions, 12 deletions
diff --git a/lib/libcrypto/dh/dh_key.c b/lib/libcrypto/dh/dh_key.c
index 3920a00d09a..dd3a3af3abc 100644
--- a/lib/libcrypto/dh/dh_key.c
+++ b/lib/libcrypto/dh/dh_key.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dh_key.c,v 1.29 2018/06/12 15:33:18 sthen Exp $ */
+/* $OpenBSD: dh_key.c,v 1.30 2018/11/05 23:46:16 tb Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
@@ -153,17 +153,9 @@ generate_key(DH *dh)
}
}
- {
- BIGNUM prk;
-
- BN_init(&prk);
- BN_with_flags(&prk, priv_key, BN_FLG_CONSTTIME);
-
- if (!dh->meth->bn_mod_exp(dh, pub_key, dh->g, &prk, dh->p, ctx,
- mont)) {
- goto err;
- }
- }
+ if (!dh->meth->bn_mod_exp(dh, pub_key, dh->g, priv_key, dh->p, ctx,
+ mont))
+ goto err;
dh->pub_key = pub_key;
dh->priv_key = priv_key;