diff options
| author | tb <> | 2024-03-02 09:27:31 +0000 |
|---|---|---|
| committer | tb <> | 2024-03-02 09:27:31 +0000 |
| commit | 7542aebe05afee384f3e3d61ec0d1ea06fe2427c (patch) | |
| tree | d56583ceff6f4723ec51bb6b5743dbe552a6a98d /src/lib/libcrypto/bn/bn.h | |
| parent | 5c948777cac23e8035e04e3971d7b5a676652af6 (diff) | |
| download | openbsd-7542aebe05afee384f3e3d61ec0d1ea06fe2427c.tar.gz openbsd-7542aebe05afee384f3e3d61ec0d1ea06fe2427c.tar.bz2 openbsd-7542aebe05afee384f3e3d61ec0d1ea06fe2427c.zip | |
Make BN_mod_exp2_mont() and BN_mod_exp_mont_word() internal
The former could be useful but nothing uses it. The latter is a
dangerous implementation detail of Montgomery exponentiation that
should never have been leaked out of the library. Fix this.
ok jsing
Diffstat (limited to 'src/lib/libcrypto/bn/bn.h')
| -rw-r--r-- | src/lib/libcrypto/bn/bn.h | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/src/lib/libcrypto/bn/bn.h b/src/lib/libcrypto/bn/bn.h index 39a5180c2c..7921075294 100644 --- a/src/lib/libcrypto/bn/bn.h +++ b/src/lib/libcrypto/bn/bn.h | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: bn.h,v 1.76 2024/03/02 09:24:59 tb Exp $ */ | 1 | /* $OpenBSD: bn.h,v 1.77 2024/03/02 09:27:31 tb Exp $ */ |
| 2 | /* Copyright (C) 1995-1997 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1997 Eric Young (eay@cryptsoft.com) |
| 3 | * All rights reserved. | 3 | * All rights reserved. |
| 4 | * | 4 | * |
| @@ -391,11 +391,6 @@ int BN_mod_exp_mont(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, | |||
| 391 | #endif | 391 | #endif |
| 392 | int BN_mod_exp_mont_consttime(BIGNUM *rr, const BIGNUM *a, const BIGNUM *p, | 392 | int BN_mod_exp_mont_consttime(BIGNUM *rr, const BIGNUM *a, const BIGNUM *p, |
| 393 | const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *in_mont); | 393 | const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *in_mont); |
| 394 | int BN_mod_exp_mont_word(BIGNUM *r, BN_ULONG a, const BIGNUM *p, | ||
| 395 | const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *m_ctx); | ||
| 396 | int BN_mod_exp2_mont(BIGNUM *r, const BIGNUM *a1, const BIGNUM *p1, | ||
| 397 | const BIGNUM *a2, const BIGNUM *p2, const BIGNUM *m, | ||
| 398 | BN_CTX *ctx, BN_MONT_CTX *m_ctx); | ||
| 399 | 394 | ||
| 400 | int BN_mask_bits(BIGNUM *a, int n); | 395 | int BN_mask_bits(BIGNUM *a, int n); |
| 401 | int BN_print_fp(FILE *fp, const BIGNUM *a); | 396 | int BN_print_fp(FILE *fp, const BIGNUM *a); |
