From a43783ab93f8c9d6f36f0c78557e0db12ae47b12 Mon Sep 17 00:00:00 2001 From: tb <> Date: Wed, 12 Feb 2025 21:21:34 +0000 Subject: 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) --- src/lib/libcrypto/bn/bn_exp.c | 6 +++--- 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 @@ -/* $OpenBSD: bn_exp.c,v 1.56 2025/01/22 12:53:16 tb Exp $ */ +/* $OpenBSD: bn_exp.c,v 1.57 2025/02/12 21:21:34 tb Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -964,7 +964,7 @@ err: } int -BN_mod_exp_recp(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, const BIGNUM *m, +BN_mod_exp_reciprocal(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, const BIGNUM *m, BN_CTX *ctx) { 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 } else ret = BN_mod_exp_mont_ct(r, a,p, m,ctx, NULL); } else { - ret = BN_mod_exp_recp(r, a,p, m, ctx); + ret = BN_mod_exp_reciprocal(r, a,p, m, ctx); } 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 @@ -/* $OpenBSD: bn_local.h,v 1.48 2025/01/22 10:12:01 tb Exp $ */ +/* $OpenBSD: bn_local.h,v 1.49 2025/02/12 21:21:34 tb Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -279,7 +279,7 @@ int BN_mod_mul_reciprocal(BIGNUM *r, const BIGNUM *x, const BIGNUM *y, BN_RECP_CTX *recp, BN_CTX *ctx); int BN_mod_sqr_reciprocal(BIGNUM *r, const BIGNUM *x, BN_RECP_CTX *recp, BN_CTX *ctx); -int BN_mod_exp_recp(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, +int BN_mod_exp_reciprocal(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, const BIGNUM *m, BN_CTX *ctx); /* Explicitly const time / non-const time versions for internal use */ -- cgit v1.2.3-55-g6feb