diff options
| author | beck <> | 2017-01-21 11:00:47 +0000 |
|---|---|---|
| committer | beck <> | 2017-01-21 11:00:47 +0000 |
| commit | 48df727a3547375dae8622c34fb55bdf5ef2c44c (patch) | |
| tree | 7ad0f2808a2ac42a510bf2f280dba63a3dfc83e3 /src/lib/libcrypto/dsa | |
| parent | 55a172a1ed5b0cd8f7de3628fcc2e56df6716d59 (diff) | |
| download | openbsd-48df727a3547375dae8622c34fb55bdf5ef2c44c.tar.gz openbsd-48df727a3547375dae8622c34fb55bdf5ef2c44c.tar.bz2 openbsd-48df727a3547375dae8622c34fb55bdf5ef2c44c.zip | |
Add ct and nonct versions of BN_mod_inverse for internal use
ok jsing@
Diffstat (limited to 'src/lib/libcrypto/dsa')
| -rw-r--r-- | src/lib/libcrypto/dsa/dsa_ossl.c | 6 |
1 files changed, 3 insertions, 3 deletions
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 @@ | |||
| 1 | /* $OpenBSD: dsa_ossl.c,v 1.28 2017/01/21 10:38:29 beck Exp $ */ | 1 | /* $OpenBSD: dsa_ossl.c,v 1.29 2017/01/21 11:00:46 beck 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 | * |
| @@ -248,7 +248,7 @@ dsa_sign_setup(DSA *dsa, BN_CTX *ctx_in, BIGNUM **kinvp, BIGNUM **rp) | |||
| 248 | goto err; | 248 | goto err; |
| 249 | 249 | ||
| 250 | /* Compute part of 's = inv(k) (m + xr) mod q' */ | 250 | /* Compute part of 's = inv(k) (m + xr) mod q' */ |
| 251 | if ((kinv = BN_mod_inverse(NULL, &k, dsa->q, ctx)) == NULL) | 251 | if ((kinv = BN_mod_inverse_ct(NULL, &k, dsa->q, ctx)) == NULL) |
| 252 | goto err; | 252 | goto err; |
| 253 | 253 | ||
| 254 | BN_clear_free(*kinvp); | 254 | BN_clear_free(*kinvp); |
| @@ -312,7 +312,7 @@ dsa_do_verify(const unsigned char *dgst, int dgst_len, DSA_SIG *sig, DSA *dsa) | |||
| 312 | 312 | ||
| 313 | /* Calculate W = inv(S) mod Q | 313 | /* Calculate W = inv(S) mod Q |
| 314 | * save W in u2 */ | 314 | * save W in u2 */ |
| 315 | if ((BN_mod_inverse(&u2, sig->s, dsa->q, ctx)) == NULL) | 315 | if ((BN_mod_inverse_ct(&u2, sig->s, dsa->q, ctx)) == NULL) |
| 316 | goto err; | 316 | goto err; |
| 317 | 317 | ||
| 318 | /* save M in u1 */ | 318 | /* save M in u1 */ |
