diff options
-rw-r--r-- | src/lib/libcrypto/bn/bn_local.h | 6 | ||||
-rw-r--r-- | src/lib/libcrypto/bn/bn_recp.c | 8 |
2 files changed, 7 insertions, 7 deletions
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 @@ | |||
1 | /* $OpenBSD: bn_local.h,v 1.47 2025/01/22 10:08:10 tb Exp $ */ | 1 | /* $OpenBSD: bn_local.h,v 1.48 2025/01/22 10:12:01 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 | * |
@@ -273,8 +273,8 @@ void BN_init(BIGNUM *); | |||
273 | 273 | ||
274 | BN_RECP_CTX *BN_RECP_CTX_create(const BIGNUM *N); | 274 | BN_RECP_CTX *BN_RECP_CTX_create(const BIGNUM *N); |
275 | void BN_RECP_CTX_free(BN_RECP_CTX *recp); | 275 | void BN_RECP_CTX_free(BN_RECP_CTX *recp); |
276 | int BN_div_recp(BIGNUM *dv, BIGNUM *rem, const BIGNUM *m, BN_RECP_CTX *recp, | 276 | int BN_div_reciprocal(BIGNUM *dv, BIGNUM *rem, const BIGNUM *m, |
277 | BN_CTX *ctx); | 277 | BN_RECP_CTX *recp, BN_CTX *ctx); |
278 | int BN_mod_mul_reciprocal(BIGNUM *r, const BIGNUM *x, const BIGNUM *y, | 278 | 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, |
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 @@ | |||
1 | /* $OpenBSD: bn_recp.c,v 1.28 2025/01/22 10:08:10 tb Exp $ */ | 1 | /* $OpenBSD: bn_recp.c,v 1.29 2025/01/22 10:12:01 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 | * |
@@ -132,7 +132,7 @@ err: | |||
132 | } | 132 | } |
133 | 133 | ||
134 | int | 134 | int |
135 | BN_div_recp(BIGNUM *dv, BIGNUM *rem, const BIGNUM *m, BN_RECP_CTX *recp, | 135 | BN_div_reciprocal(BIGNUM *dv, BIGNUM *rem, const BIGNUM *m, BN_RECP_CTX *recp, |
136 | BN_CTX *ctx) | 136 | BN_CTX *ctx) |
137 | { | 137 | { |
138 | int i, j, ret = 0; | 138 | int i, j, ret = 0; |
@@ -233,7 +233,7 @@ BN_mod_mul_reciprocal(BIGNUM *r, const BIGNUM *x, const BIGNUM *y, | |||
233 | if (!BN_mul(r, x, y, ctx)) | 233 | if (!BN_mul(r, x, y, ctx)) |
234 | return 0; | 234 | return 0; |
235 | 235 | ||
236 | return BN_div_recp(NULL, r, r, recp, ctx); | 236 | return BN_div_reciprocal(NULL, r, r, recp, ctx); |
237 | } | 237 | } |
238 | 238 | ||
239 | /* Compute r = x^2 % m. */ | 239 | /* 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 | |||
243 | if (!BN_sqr(r, x, ctx)) | 243 | if (!BN_sqr(r, x, ctx)) |
244 | return 0; | 244 | return 0; |
245 | 245 | ||
246 | return BN_div_recp(NULL, r, r, recp, ctx); | 246 | return BN_div_reciprocal(NULL, r, r, recp, ctx); |
247 | } | 247 | } |