diff options
| author | tb <> | 2025-02-12 21:21:34 +0000 |
|---|---|---|
| committer | tb <> | 2025-02-12 21:21:34 +0000 |
| commit | a43783ab93f8c9d6f36f0c78557e0db12ae47b12 (patch) | |
| tree | c1fa31e2af564c107a213bec9541e1d7b698940c /src | |
| parent | 6c52bae3df522ccb0c1f2d5138b4c0c6bad8152c (diff) | |
| download | openbsd-a43783ab93f8c9d6f36f0c78557e0db12ae47b12.tar.gz openbsd-a43783ab93f8c9d6f36f0c78557e0db12ae47b12.tar.bz2 openbsd-a43783ab93f8c9d6f36f0c78557e0db12ae47b12.zip | |
Rename BN_mod_exp_recp() to BN_mod_exp_reciprocal()
(leaving out a dotasm comment that would become harder to read than it
already is)
Diffstat (limited to 'src')
| -rw-r--r-- | src/lib/libcrypto/bn/bn_exp.c | 6 | ||||
| -rw-r--r-- | src/lib/libcrypto/bn/bn_local.h | 4 |
2 files changed, 5 insertions, 5 deletions
diff --git a/src/lib/libcrypto/bn/bn_exp.c b/src/lib/libcrypto/bn/bn_exp.c index 2aa41f8658..85c192b30a 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.56 2025/01/22 12:53:16 tb Exp $ */ | 1 | /* $OpenBSD: bn_exp.c,v 1.57 2025/02/12 21:21:34 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 | * |
| @@ -964,7 +964,7 @@ err: | |||
| 964 | } | 964 | } |
| 965 | 965 | ||
| 966 | int | 966 | int |
| 967 | BN_mod_exp_recp(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, const BIGNUM *m, | 967 | BN_mod_exp_reciprocal(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, const BIGNUM *m, |
| 968 | BN_CTX *ctx) | 968 | BN_CTX *ctx) |
| 969 | { | 969 | { |
| 970 | int i, j, bits, wstart, wend, window, wvalue; | 970 | int i, j, bits, wstart, wend, window, wvalue; |
| @@ -1137,7 +1137,7 @@ BN_mod_exp_internal(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, const BIGNUM *m | |||
| 1137 | } else | 1137 | } else |
| 1138 | ret = BN_mod_exp_mont_ct(r, a,p, m,ctx, NULL); | 1138 | ret = BN_mod_exp_mont_ct(r, a,p, m,ctx, NULL); |
| 1139 | } else { | 1139 | } else { |
| 1140 | ret = BN_mod_exp_recp(r, a,p, m, ctx); | 1140 | ret = BN_mod_exp_reciprocal(r, a,p, m, ctx); |
| 1141 | } | 1141 | } |
| 1142 | 1142 | ||
| 1143 | return (ret); | 1143 | return (ret); |
diff --git a/src/lib/libcrypto/bn/bn_local.h b/src/lib/libcrypto/bn/bn_local.h index fe3abeeb9a..4b42ae95ee 100644 --- a/src/lib/libcrypto/bn/bn_local.h +++ b/src/lib/libcrypto/bn/bn_local.h | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: bn_local.h,v 1.48 2025/01/22 10:12:01 tb Exp $ */ | 1 | /* $OpenBSD: bn_local.h,v 1.49 2025/02/12 21:21:34 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 | * |
| @@ -279,7 +279,7 @@ int BN_mod_mul_reciprocal(BIGNUM *r, const BIGNUM *x, const BIGNUM *y, | |||
| 279 | BN_RECP_CTX *recp, BN_CTX *ctx); | 279 | BN_RECP_CTX *recp, BN_CTX *ctx); |
| 280 | int BN_mod_sqr_reciprocal(BIGNUM *r, const BIGNUM *x, BN_RECP_CTX *recp, | 280 | int BN_mod_sqr_reciprocal(BIGNUM *r, const BIGNUM *x, BN_RECP_CTX *recp, |
| 281 | BN_CTX *ctx); | 281 | BN_CTX *ctx); |
| 282 | int BN_mod_exp_recp(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, | 282 | int BN_mod_exp_reciprocal(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, |
| 283 | const BIGNUM *m, BN_CTX *ctx); | 283 | const BIGNUM *m, BN_CTX *ctx); |
| 284 | 284 | ||
| 285 | /* Explicitly const time / non-const time versions for internal use */ | 285 | /* Explicitly const time / non-const time versions for internal use */ |
