diff options
author | 2017-01-21 10:38:29 +0000 | |
---|---|---|
committer | 2017-01-21 10:38:29 +0000 | |
commit | 44adc1eac90b19e731ed767b8523ee067b63713a (patch) | |
tree | ad2d2fed1b8bb12b462bdabe3acea9519d5fff18 /lib/libcrypto/dsa/dsa_ossl.c | |
parent | Having a 'case 256:' in a switch (<uchar>) {} is bad on principle (diff) | |
download | wireguard-openbsd-44adc1eac90b19e731ed767b8523ee067b63713a.tar.xz wireguard-openbsd-44adc1eac90b19e731ed767b8523ee067b63713a.zip |
Split out BN_div and BN_mod into ct and nonct versions for Internal use.
ok jsing@
Diffstat (limited to 'lib/libcrypto/dsa/dsa_ossl.c')
-rw-r--r-- | lib/libcrypto/dsa/dsa_ossl.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/libcrypto/dsa/dsa_ossl.c b/lib/libcrypto/dsa/dsa_ossl.c index 3f01a83a446..4177557d0ec 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.27 2017/01/21 09:38:59 beck Exp $ */ +/* $OpenBSD: dsa_ossl.c,v 1.28 2017/01/21 10:38:29 beck Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -244,7 +244,7 @@ dsa_sign_setup(DSA *dsa, BN_CTX *ctx_in, BIGNUM **kinvp, BIGNUM **rp) goto err; } - if (!BN_mod(r,r,dsa->q,ctx)) + if (!BN_mod_ct(r,r,dsa->q,ctx)) goto err; /* Compute part of 's = inv(k) (m + xr) mod q' */ @@ -351,10 +351,10 @@ dsa_do_verify(const unsigned char *dgst, int dgst_len, DSA_SIG *sig, DSA *dsa) mont)) goto err; } - + /* BN_copy(&u1,&t1); */ /* let u1 = u1 mod q */ - if (!BN_mod(&u1, &t1, dsa->q, ctx)) + if (!BN_mod_ct(&u1, &t1, dsa->q, ctx)) goto err; /* V is now in u1. If the signature is correct, it will be |