summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/lib/libcrypto/bn/bn_exp.c6
-rw-r--r--src/lib/libcrypto/bn/bn_local.h4
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
966int 966int
967BN_mod_exp_recp(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, const BIGNUM *m, 967BN_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);
280int BN_mod_sqr_reciprocal(BIGNUM *r, const BIGNUM *x, BN_RECP_CTX *recp, 280int BN_mod_sqr_reciprocal(BIGNUM *r, const BIGNUM *x, BN_RECP_CTX *recp,
281 BN_CTX *ctx); 281 BN_CTX *ctx);
282int BN_mod_exp_recp(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, 282int 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 */