diff options
author | beck <> | 2017-01-21 11:00:47 +0000 |
---|---|---|
committer | beck <> | 2017-01-21 11:00:47 +0000 |
commit | 9a561f2327a3e6b5ee853e60427012bfe6e02043 (patch) | |
tree | 7ad0f2808a2ac42a510bf2f280dba63a3dfc83e3 /src/lib/libcrypto/bn/bn_blind.c | |
parent | bce45cc241b51da39ead8b476c811b47d76ccc46 (diff) | |
download | openbsd-9a561f2327a3e6b5ee853e60427012bfe6e02043.tar.gz openbsd-9a561f2327a3e6b5ee853e60427012bfe6e02043.tar.bz2 openbsd-9a561f2327a3e6b5ee853e60427012bfe6e02043.zip |
Add ct and nonct versions of BN_mod_inverse for internal use
ok jsing@
Diffstat (limited to 'src/lib/libcrypto/bn/bn_blind.c')
-rw-r--r-- | src/lib/libcrypto/bn/bn_blind.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/libcrypto/bn/bn_blind.c b/src/lib/libcrypto/bn/bn_blind.c index 01874f6208..28c6276751 100644 --- a/src/lib/libcrypto/bn/bn_blind.c +++ b/src/lib/libcrypto/bn/bn_blind.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: bn_blind.c,v 1.15 2017/01/21 09:38:58 beck Exp $ */ | 1 | /* $OpenBSD: bn_blind.c,v 1.16 2017/01/21 11:00:46 beck Exp $ */ |
2 | /* ==================================================================== | 2 | /* ==================================================================== |
3 | * Copyright (c) 1998-2006 The OpenSSL Project. All rights reserved. | 3 | * Copyright (c) 1998-2006 The OpenSSL Project. All rights reserved. |
4 | * | 4 | * |
@@ -351,7 +351,7 @@ BN_BLINDING_create_param(BN_BLINDING *b, const BIGNUM *e, BIGNUM *m, | |||
351 | do { | 351 | do { |
352 | if (!BN_rand_range(ret->A, ret->mod)) | 352 | if (!BN_rand_range(ret->A, ret->mod)) |
353 | goto err; | 353 | goto err; |
354 | if (BN_mod_inverse(ret->Ai, ret->A, ret->mod, ctx) == NULL) { | 354 | if (BN_mod_inverse_ct(ret->Ai, ret->A, ret->mod, ctx) == NULL) { |
355 | /* this should almost never happen for good RSA keys */ | 355 | /* this should almost never happen for good RSA keys */ |
356 | unsigned long error = ERR_peek_last_error(); | 356 | unsigned long error = ERR_peek_last_error(); |
357 | if (ERR_GET_REASON(error) == BN_R_NO_INVERSE) { | 357 | if (ERR_GET_REASON(error) == BN_R_NO_INVERSE) { |