From b7d5fcfa073d6408fd2af787acdc717bb412fd8f Mon Sep 17 00:00:00 2001 From: tb <> Date: Mon, 5 Nov 2018 23:46:16 +0000 Subject: Remove two unnecessary BN_FLG_CONSTTIME dances: BN_mod_exp_ct() already takes care of this internally. ok beck jsing --- src/lib/libcrypto/dsa/dsa_key.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) (limited to 'src/lib/libcrypto/dsa/dsa_key.c') diff --git a/src/lib/libcrypto/dsa/dsa_key.c b/src/lib/libcrypto/dsa/dsa_key.c index cb95e1369c..b2d08e5e0c 100644 --- a/src/lib/libcrypto/dsa/dsa_key.c +++ b/src/lib/libcrypto/dsa/dsa_key.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dsa_key.c,v 1.23 2017/01/21 09:38:59 beck Exp $ */ +/* $OpenBSD: dsa_key.c,v 1.24 2018/11/05 23:46:16 tb Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -104,14 +104,8 @@ dsa_builtin_keygen(DSA *dsa) } else pub_key=dsa->pub_key; - { - BIGNUM prk; - - BN_with_flags(&prk, priv_key, BN_FLG_CONSTTIME); - - if (!BN_mod_exp_ct(pub_key, dsa->g, &prk, dsa->p, ctx)) - goto err; - } + if (!BN_mod_exp_ct(pub_key, dsa->g, priv_key, dsa->p, ctx)) + goto err; dsa->priv_key = priv_key; dsa->pub_key = pub_key; -- cgit v1.2.3-55-g6feb