diff options
| author | beck <> | 2017-01-21 10:38:29 +0000 | 
|---|---|---|
| committer | beck <> | 2017-01-21 10:38:29 +0000 | 
| commit | 55a172a1ed5b0cd8f7de3628fcc2e56df6716d59 (patch) | |
| tree | ec1232403b181357067d4ac6dc7124fb566c88d8 /src/lib/libcrypto/dsa/dsa_ossl.c | |
| parent | a0a595cda97de2b217b0582cfa601ee4c746bfce (diff) | |
| download | openbsd-55a172a1ed5b0cd8f7de3628fcc2e56df6716d59.tar.gz openbsd-55a172a1ed5b0cd8f7de3628fcc2e56df6716d59.tar.bz2 openbsd-55a172a1ed5b0cd8f7de3628fcc2e56df6716d59.zip  | |
Split out BN_div and BN_mod into ct and nonct versions for Internal use.
ok jsing@
Diffstat (limited to 'src/lib/libcrypto/dsa/dsa_ossl.c')
| -rw-r--r-- | src/lib/libcrypto/dsa/dsa_ossl.c | 8 | 
1 files changed, 4 insertions, 4 deletions
diff --git a/src/lib/libcrypto/dsa/dsa_ossl.c b/src/lib/libcrypto/dsa/dsa_ossl.c index 3f01a83a44..4177557d0e 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.27 2017/01/21 09:38:59 beck Exp $ */ | 1 | /* $OpenBSD: dsa_ossl.c,v 1.28 2017/01/21 10:38:29 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 | * | 
| @@ -244,7 +244,7 @@ dsa_sign_setup(DSA *dsa, BN_CTX *ctx_in, BIGNUM **kinvp, BIGNUM **rp) | |||
| 244 | goto err; | 244 | goto err; | 
| 245 | } | 245 | } | 
| 246 | 246 | ||
| 247 | if (!BN_mod(r,r,dsa->q,ctx)) | 247 | if (!BN_mod_ct(r,r,dsa->q,ctx)) | 
| 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' */ | 
| @@ -351,10 +351,10 @@ dsa_do_verify(const unsigned char *dgst, int dgst_len, DSA_SIG *sig, DSA *dsa) | |||
| 351 | mont)) | 351 | mont)) | 
| 352 | goto err; | 352 | goto err; | 
| 353 | } | 353 | } | 
| 354 | 354 | ||
| 355 | /* BN_copy(&u1,&t1); */ | 355 | /* BN_copy(&u1,&t1); */ | 
| 356 | /* let u1 = u1 mod q */ | 356 | /* let u1 = u1 mod q */ | 
| 357 | if (!BN_mod(&u1, &t1, dsa->q, ctx)) | 357 | if (!BN_mod_ct(&u1, &t1, dsa->q, ctx)) | 
| 358 | goto err; | 358 | goto err; | 
| 359 | 359 | ||
| 360 | /* V is now in u1. If the signature is correct, it will be | 360 | /* V is now in u1. If the signature is correct, it will be | 
