From 9a561f2327a3e6b5ee853e60427012bfe6e02043 Mon Sep 17 00:00:00 2001 From: beck <> Date: Sat, 21 Jan 2017 11:00:47 +0000 Subject: Add ct and nonct versions of BN_mod_inverse for internal use ok jsing@ --- src/lib/libcrypto/dsa/dsa_ossl.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/lib/libcrypto/dsa/dsa_ossl.c') diff --git a/src/lib/libcrypto/dsa/dsa_ossl.c b/src/lib/libcrypto/dsa/dsa_ossl.c index 4177557d0e..f806cd645a 100644 --- a/src/lib/libcrypto/dsa/dsa_ossl.c +++ b/src/lib/libcrypto/dsa/dsa_ossl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dsa_ossl.c,v 1.28 2017/01/21 10:38:29 beck Exp $ */ +/* $OpenBSD: dsa_ossl.c,v 1.29 2017/01/21 11:00:46 beck Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -248,7 +248,7 @@ dsa_sign_setup(DSA *dsa, BN_CTX *ctx_in, BIGNUM **kinvp, BIGNUM **rp) goto err; /* Compute part of 's = inv(k) (m + xr) mod q' */ - if ((kinv = BN_mod_inverse(NULL, &k, dsa->q, ctx)) == NULL) + if ((kinv = BN_mod_inverse_ct(NULL, &k, dsa->q, ctx)) == NULL) goto err; BN_clear_free(*kinvp); @@ -312,7 +312,7 @@ dsa_do_verify(const unsigned char *dgst, int dgst_len, DSA_SIG *sig, DSA *dsa) /* Calculate W = inv(S) mod Q * save W in u2 */ - if ((BN_mod_inverse(&u2, sig->s, dsa->q, ctx)) == NULL) + if ((BN_mod_inverse_ct(&u2, sig->s, dsa->q, ctx)) == NULL) goto err; /* save M in u1 */ -- cgit v1.2.3-55-g6feb