summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/bn
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libcrypto/bn')
-rw-r--r--src/lib/libcrypto/bn/bn.h7
-rw-r--r--src/lib/libcrypto/bn/bn_exp.c4
-rw-r--r--src/lib/libcrypto/bn/bn_local.h8
3 files changed, 9 insertions, 10 deletions
diff --git a/src/lib/libcrypto/bn/bn.h b/src/lib/libcrypto/bn/bn.h
index 39a5180c2c..7921075294 100644
--- a/src/lib/libcrypto/bn/bn.h
+++ b/src/lib/libcrypto/bn/bn.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: bn.h,v 1.76 2024/03/02 09:24:59 tb Exp $ */ 1/* $OpenBSD: bn.h,v 1.77 2024/03/02 09:27:31 tb Exp $ */
2/* Copyright (C) 1995-1997 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1997 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -391,11 +391,6 @@ int BN_mod_exp_mont(BIGNUM *r, const BIGNUM *a, const BIGNUM *p,
391#endif 391#endif
392int BN_mod_exp_mont_consttime(BIGNUM *rr, const BIGNUM *a, const BIGNUM *p, 392int BN_mod_exp_mont_consttime(BIGNUM *rr, const BIGNUM *a, const BIGNUM *p,
393 const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *in_mont); 393 const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *in_mont);
394int BN_mod_exp_mont_word(BIGNUM *r, BN_ULONG a, const BIGNUM *p,
395 const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *m_ctx);
396int BN_mod_exp2_mont(BIGNUM *r, const BIGNUM *a1, const BIGNUM *p1,
397 const BIGNUM *a2, const BIGNUM *p2, const BIGNUM *m,
398 BN_CTX *ctx, BN_MONT_CTX *m_ctx);
399 394
400int BN_mask_bits(BIGNUM *a, int n); 395int BN_mask_bits(BIGNUM *a, int n);
401int BN_print_fp(FILE *fp, const BIGNUM *a); 396int BN_print_fp(FILE *fp, const BIGNUM *a);
diff --git a/src/lib/libcrypto/bn/bn_exp.c b/src/lib/libcrypto/bn/bn_exp.c
index e4e06db149..04852424f7 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.51 2024/03/02 09:24:59 tb Exp $ */ 1/* $OpenBSD: bn_exp.c,v 1.52 2024/03/02 09:27:31 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 *
@@ -961,7 +961,6 @@ err:
961 BN_CTX_end(ctx); 961 BN_CTX_end(ctx);
962 return (ret); 962 return (ret);
963} 963}
964LCRYPTO_ALIAS(BN_mod_exp_mont_word);
965 964
966int 965int
967BN_mod_exp_recp(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, const BIGNUM *m, 966BN_mod_exp_recp(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, const BIGNUM *m,
@@ -1353,4 +1352,3 @@ err:
1353 BN_CTX_end(ctx); 1352 BN_CTX_end(ctx);
1354 return (ret); 1353 return (ret);
1355} 1354}
1356LCRYPTO_ALIAS(BN_mod_exp2_mont);
diff --git a/src/lib/libcrypto/bn/bn_local.h b/src/lib/libcrypto/bn/bn_local.h
index e5c4cddc92..5acb546d07 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.39 2024/03/02 09:24:59 tb Exp $ */ 1/* $OpenBSD: bn_local.h,v 1.40 2024/03/02 09:27:31 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 *
@@ -308,6 +308,12 @@ int BN_div_ct(BIGNUM *q, BIGNUM *r, const BIGNUM *n, const BIGNUM *d,
308int BN_mod_ct(BIGNUM *r, const BIGNUM *a, const BIGNUM *m, BN_CTX *ctx); 308int BN_mod_ct(BIGNUM *r, const BIGNUM *a, const BIGNUM *m, BN_CTX *ctx);
309int BN_mod_nonct(BIGNUM *r, const BIGNUM *a, const BIGNUM *m, BN_CTX *ctx); 309int BN_mod_nonct(BIGNUM *r, const BIGNUM *a, const BIGNUM *m, BN_CTX *ctx);
310 310
311int BN_mod_exp_mont_word(BIGNUM *r, BN_ULONG a, const BIGNUM *p,
312 const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *m_ctx);
313int BN_mod_exp2_mont(BIGNUM *r, const BIGNUM *a1, const BIGNUM *p1,
314 const BIGNUM *a2, const BIGNUM *p2, const BIGNUM *m,
315 BN_CTX *ctx, BN_MONT_CTX *m_ctx);
316
311int BN_mod_exp_simple(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, 317int BN_mod_exp_simple(BIGNUM *r, const BIGNUM *a, const BIGNUM *p,
312 const BIGNUM *m, BN_CTX *ctx); 318 const BIGNUM *m, BN_CTX *ctx);
313 319