From 884764157a07e35ad4761bc538c4c284e8105c87 Mon Sep 17 00:00:00 2001 From: tb <> Date: Wed, 22 Jan 2025 10:12:01 +0000 Subject: Rename BN_div_recp() into BN_div_reciprocal() Requested by jsing --- src/lib/libcrypto/bn/bn_local.h | 6 +++--- src/lib/libcrypto/bn/bn_recp.c | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) (limited to 'src') diff --git a/src/lib/libcrypto/bn/bn_local.h b/src/lib/libcrypto/bn/bn_local.h index d9389995f7..fe3abeeb9a 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.47 2025/01/22 10:08:10 tb Exp $ */ +/* $OpenBSD: bn_local.h,v 1.48 2025/01/22 10:12:01 tb Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -273,8 +273,8 @@ void BN_init(BIGNUM *); BN_RECP_CTX *BN_RECP_CTX_create(const BIGNUM *N); void BN_RECP_CTX_free(BN_RECP_CTX *recp); -int BN_div_recp(BIGNUM *dv, BIGNUM *rem, const BIGNUM *m, BN_RECP_CTX *recp, - BN_CTX *ctx); +int BN_div_reciprocal(BIGNUM *dv, BIGNUM *rem, const BIGNUM *m, + BN_RECP_CTX *recp, BN_CTX *ctx); 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, diff --git a/src/lib/libcrypto/bn/bn_recp.c b/src/lib/libcrypto/bn/bn_recp.c index bf38380710..6277b06dab 100644 --- a/src/lib/libcrypto/bn/bn_recp.c +++ b/src/lib/libcrypto/bn/bn_recp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bn_recp.c,v 1.28 2025/01/22 10:08:10 tb Exp $ */ +/* $OpenBSD: bn_recp.c,v 1.29 2025/01/22 10:12:01 tb Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -132,7 +132,7 @@ err: } int -BN_div_recp(BIGNUM *dv, BIGNUM *rem, const BIGNUM *m, BN_RECP_CTX *recp, +BN_div_reciprocal(BIGNUM *dv, BIGNUM *rem, const BIGNUM *m, BN_RECP_CTX *recp, BN_CTX *ctx) { int i, j, ret = 0; @@ -233,7 +233,7 @@ BN_mod_mul_reciprocal(BIGNUM *r, const BIGNUM *x, const BIGNUM *y, if (!BN_mul(r, x, y, ctx)) return 0; - return BN_div_recp(NULL, r, r, recp, ctx); + return BN_div_reciprocal(NULL, r, r, recp, ctx); } /* Compute r = x^2 % m. */ @@ -243,5 +243,5 @@ BN_mod_sqr_reciprocal(BIGNUM *r, const BIGNUM *x, BN_RECP_CTX *recp, BN_CTX *ctx if (!BN_sqr(r, x, ctx)) return 0; - return BN_div_recp(NULL, r, r, recp, ctx); + return BN_div_reciprocal(NULL, r, r, recp, ctx); } -- cgit v1.2.3-55-g6feb