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/bn/bn_gcd.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/bn/bn_gcd.c')
| -rw-r--r-- | src/lib/libcrypto/bn/bn_gcd.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/libcrypto/bn/bn_gcd.c b/src/lib/libcrypto/bn/bn_gcd.c index da9c29a8e5..3c8ff5b405 100644 --- a/src/lib/libcrypto/bn/bn_gcd.c +++ b/src/lib/libcrypto/bn/bn_gcd.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: bn_gcd.c,v 1.10 2015/02/09 15:49:22 jsing Exp $ */ | 1 | /* $OpenBSD: bn_gcd.c,v 1.11 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 | * |
| @@ -421,7 +421,7 @@ BN_mod_inverse(BIGNUM *in, const BIGNUM *a, const BIGNUM *n, BN_CTX *ctx) | |||
| 421 | } | 421 | } |
| 422 | } | 422 | } |
| 423 | } else { | 423 | } else { |
| 424 | if (!BN_div(D, M, A, B, ctx)) | 424 | if (!BN_div_ct(D, M, A, B, ctx)) |
| 425 | goto err; | 425 | goto err; |
| 426 | } | 426 | } |
| 427 | 427 | ||
| @@ -605,7 +605,7 @@ BN_mod_inverse_no_branch(BIGNUM *in, const BIGNUM *a, const BIGNUM *n, | |||
| 605 | BN_with_flags(pA, A, BN_FLG_CONSTTIME); | 605 | BN_with_flags(pA, A, BN_FLG_CONSTTIME); |
| 606 | 606 | ||
| 607 | /* (D, M) := (A/B, A%B) ... */ | 607 | /* (D, M) := (A/B, A%B) ... */ |
| 608 | if (!BN_div(D, M, pA, B, ctx)) | 608 | if (!BN_div_ct(D, M, pA, B, ctx)) |
| 609 | goto err; | 609 | goto err; |
| 610 | 610 | ||
| 611 | /* Now | 611 | /* Now |
