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_exp.c | |
| 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_exp.c')
| -rw-r--r-- | src/lib/libcrypto/bn/bn_exp.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/lib/libcrypto/bn/bn_exp.c b/src/lib/libcrypto/bn/bn_exp.c index e4e06db149..04852424f7 100644 --- a/src/lib/libcrypto/bn/bn_exp.c +++ b/src/lib/libcrypto/bn/bn_exp.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: bn_exp.c,v 1.51 2024/03/02 09:24:59 tb Exp $ */ | 1 | /* $OpenBSD: bn_exp.c,v 1.52 2024/03/02 09:27:31 tb 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 | * |
| @@ -961,7 +961,6 @@ err: | |||
| 961 | BN_CTX_end(ctx); | 961 | BN_CTX_end(ctx); |
| 962 | return (ret); | 962 | return (ret); |
| 963 | } | 963 | } |
| 964 | LCRYPTO_ALIAS(BN_mod_exp_mont_word); | ||
| 965 | 964 | ||
| 966 | int | 965 | int |
| 967 | BN_mod_exp_recp(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, const BIGNUM *m, | 966 | BN_mod_exp_recp(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, const BIGNUM *m, |
| @@ -1353,4 +1352,3 @@ err: | |||
| 1353 | BN_CTX_end(ctx); | 1352 | BN_CTX_end(ctx); |
| 1354 | return (ret); | 1353 | return (ret); |
| 1355 | } | 1354 | } |
| 1356 | LCRYPTO_ALIAS(BN_mod_exp2_mont); | ||
