projects
/
oweals
/
openssl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
033dc8f
)
Set flag BN_FLG_CONSTTIME earlier
author
Cesar Pereida
<cesar.pereida@aalto.fi>
Tue, 7 Jun 2016 13:02:01 +0000
(16:02 +0300)
committer
Matt Caswell
<matt@openssl.org>
Tue, 7 Jun 2016 14:26:57 +0000
(15:26 +0100)
Reviewed-by: Rich Salz <rsalz@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
crypto/dsa/dsa_ossl.c
patch
|
blob
|
history
diff --git
a/crypto/dsa/dsa_ossl.c
b/crypto/dsa/dsa_ossl.c
index 81c52398692a7f4acb1567e70a04a9e030e005ee..9c97ef949c0c5f02060b03bcd5d72b5313219cf6 100644
(file)
--- a/
crypto/dsa/dsa_ossl.c
+++ b/
crypto/dsa/dsa_ossl.c
@@
-167,6
+167,8
@@
static int dsa_sign_setup(DSA *dsa, BN_CTX *ctx_in,
goto err;
} while (BN_is_zero(k));
+ BN_set_flags(k, BN_FLG_CONSTTIME);
+
if (dsa->flags & DSA_FLAG_CACHE_MONT_P) {
if (!BN_MONT_CTX_set_locked(&dsa->method_mont_p,
dsa->lock, dsa->p, ctx))
@@
-189,8
+191,6
@@
static int dsa_sign_setup(DSA *dsa, BN_CTX *ctx_in,
goto err;
}
- BN_set_flags(k, BN_FLG_CONSTTIME);
-
if ((dsa)->meth->bn_mod_exp != NULL) {
if (!dsa->meth->bn_mod_exp(dsa, r, dsa->g, k, dsa->p, ctx,
dsa->method_mont_p))
@@
-200,7
+200,6
@@
static int dsa_sign_setup(DSA *dsa, BN_CTX *ctx_in,
goto err;
}
-
if (!BN_mod(r, r, dsa->q, ctx))
goto err;