diff options
author | 2017-01-21 11:00:46 +0000 | |
---|---|---|
committer | 2017-01-21 11:00:46 +0000 | |
commit | b0f5cbc3c22568232a5f0f45fea89dd1cbb6063b (patch) | |
tree | 8f91fe3f7e40e41306d3e708618d467422c540af /lib/libcrypto/dsa/dsa_ossl.c | |
parent | Move virtio config from files.pci to files.pci (diff) | |
download | wireguard-openbsd-b0f5cbc3c22568232a5f0f45fea89dd1cbb6063b.tar.xz wireguard-openbsd-b0f5cbc3c22568232a5f0f45fea89dd1cbb6063b.zip |
Add ct and nonct versions of BN_mod_inverse for internal use
ok jsing@
Diffstat (limited to 'lib/libcrypto/dsa/dsa_ossl.c')
-rw-r--r-- | lib/libcrypto/dsa/dsa_ossl.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/libcrypto/dsa/dsa_ossl.c b/lib/libcrypto/dsa/dsa_ossl.c index 4177557d0ec..f806cd645ae 100644 --- a/lib/libcrypto/dsa/dsa_ossl.c +++ b/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 */ |