summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/bn/bn.h
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/lib/libcrypto/bn/bn.h11
1 files changed, 2 insertions, 9 deletions
diff --git a/src/lib/libcrypto/bn/bn.h b/src/lib/libcrypto/bn/bn.h
index 7921075294..523ff42877 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.77 2024/03/02 09:27:31 tb Exp $ */ 1/* $OpenBSD: bn.h,v 1.78 2024/04/10 14:58:06 beck 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 *
@@ -350,11 +350,10 @@ void BN_set_negative(BIGNUM *b, int n);
350 350
351int BN_is_negative(const BIGNUM *b); 351int BN_is_negative(const BIGNUM *b);
352 352
353#ifndef LIBRESSL_INTERNAL
354int BN_div(BIGNUM *dv, BIGNUM *rem, const BIGNUM *m, const BIGNUM *d, 353int BN_div(BIGNUM *dv, BIGNUM *rem, const BIGNUM *m, const BIGNUM *d,
355 BN_CTX *ctx); 354 BN_CTX *ctx);
356#define BN_mod(rem,m,d,ctx) BN_div(NULL,(rem),(m),(d),(ctx)) 355#define BN_mod(rem,m,d,ctx) BN_div(NULL,(rem),(m),(d),(ctx))
357#endif 356
358int BN_nnmod(BIGNUM *r, const BIGNUM *m, const BIGNUM *d, BN_CTX *ctx); 357int BN_nnmod(BIGNUM *r, const BIGNUM *m, const BIGNUM *d, BN_CTX *ctx);
359int BN_mod_add(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, const BIGNUM *m, BN_CTX *ctx); 358int BN_mod_add(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, const BIGNUM *m, BN_CTX *ctx);
360int BN_mod_add_quick(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, const BIGNUM *m); 359int BN_mod_add_quick(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, const BIGNUM *m);
@@ -383,12 +382,10 @@ int BN_lshift(BIGNUM *r, const BIGNUM *a, int n);
383int BN_lshift1(BIGNUM *r, const BIGNUM *a); 382int BN_lshift1(BIGNUM *r, const BIGNUM *a);
384int BN_exp(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx); 383int BN_exp(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx);
385 384
386#ifndef LIBRESSL_INTERNAL
387int BN_mod_exp(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, 385int BN_mod_exp(BIGNUM *r, const BIGNUM *a, const BIGNUM *p,
388 const BIGNUM *m, BN_CTX *ctx); 386 const BIGNUM *m, BN_CTX *ctx);
389int BN_mod_exp_mont(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, 387int BN_mod_exp_mont(BIGNUM *r, const BIGNUM *a, const BIGNUM *p,
390 const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *m_ctx); 388 const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *m_ctx);
391#endif
392int BN_mod_exp_mont_consttime(BIGNUM *rr, const BIGNUM *a, const BIGNUM *p, 389int 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); 390 const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *in_mont);
394 391
@@ -407,14 +404,10 @@ char * BN_bn2dec(const BIGNUM *a);
407int BN_hex2bn(BIGNUM **a, const char *str); 404int BN_hex2bn(BIGNUM **a, const char *str);
408int BN_dec2bn(BIGNUM **a, const char *str); 405int BN_dec2bn(BIGNUM **a, const char *str);
409int BN_asc2bn(BIGNUM **a, const char *str); 406int BN_asc2bn(BIGNUM **a, const char *str);
410#ifndef LIBRESSL_INTERNAL
411int BN_gcd(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, BN_CTX *ctx); 407int BN_gcd(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, BN_CTX *ctx);
412#endif
413int BN_kronecker(const BIGNUM *a,const BIGNUM *b,BN_CTX *ctx); /* returns -2 for error */ 408int BN_kronecker(const BIGNUM *a,const BIGNUM *b,BN_CTX *ctx); /* returns -2 for error */
414#ifndef LIBRESSL_INTERNAL
415BIGNUM *BN_mod_inverse(BIGNUM *ret, 409BIGNUM *BN_mod_inverse(BIGNUM *ret,
416 const BIGNUM *a, const BIGNUM *n, BN_CTX *ctx); 410 const BIGNUM *a, const BIGNUM *n, BN_CTX *ctx);
417#endif
418BIGNUM *BN_mod_sqrt(BIGNUM *ret, 411BIGNUM *BN_mod_sqrt(BIGNUM *ret,
419 const BIGNUM *a, const BIGNUM *n, BN_CTX *ctx); 412 const BIGNUM *a, const BIGNUM *n, BN_CTX *ctx);
420 413