diff options
author | tb <> | 2018-11-05 23:46:16 +0000 |
---|---|---|
committer | tb <> | 2018-11-05 23:46:16 +0000 |
commit | b7d5fcfa073d6408fd2af787acdc717bb412fd8f (patch) | |
tree | f89428424a996b8bf593bce307ec99b2e266b8e8 /src/lib/libcrypto/dsa | |
parent | cc6841304de92627d97efb8864bf697cea3c3c11 (diff) | |
download | openbsd-b7d5fcfa073d6408fd2af787acdc717bb412fd8f.tar.gz openbsd-b7d5fcfa073d6408fd2af787acdc717bb412fd8f.tar.bz2 openbsd-b7d5fcfa073d6408fd2af787acdc717bb412fd8f.zip |
Remove two unnecessary BN_FLG_CONSTTIME dances: BN_mod_exp_ct() already
takes care of this internally.
ok beck jsing
Diffstat (limited to 'src/lib/libcrypto/dsa')
-rw-r--r-- | src/lib/libcrypto/dsa/dsa_key.c | 12 |
1 files changed, 3 insertions, 9 deletions
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 @@ | |||
1 | /* $OpenBSD: dsa_key.c,v 1.23 2017/01/21 09:38:59 beck Exp $ */ | 1 | /* $OpenBSD: dsa_key.c,v 1.24 2018/11/05 23:46:16 tb 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 | * |
@@ -104,14 +104,8 @@ dsa_builtin_keygen(DSA *dsa) | |||
104 | } else | 104 | } else |
105 | pub_key=dsa->pub_key; | 105 | pub_key=dsa->pub_key; |
106 | 106 | ||
107 | { | 107 | if (!BN_mod_exp_ct(pub_key, dsa->g, priv_key, dsa->p, ctx)) |
108 | BIGNUM prk; | 108 | goto err; |
109 | |||
110 | BN_with_flags(&prk, priv_key, BN_FLG_CONSTTIME); | ||
111 | |||
112 | if (!BN_mod_exp_ct(pub_key, dsa->g, &prk, dsa->p, ctx)) | ||
113 | goto err; | ||
114 | } | ||
115 | 109 | ||
116 | dsa->priv_key = priv_key; | 110 | dsa->priv_key = priv_key; |
117 | dsa->pub_key = pub_key; | 111 | dsa->pub_key = pub_key; |