Classes | Macros | Enumerations | Functions
bn.h File Reference
#include <openssl/base.h>
#include <openssl/thread.h>
#include <inttypes.h>
#include <stdio.h>
Include dependency graph for bn.h:

Go to the source code of this file.

Classes

struct  bignum_st
 
struct  bn_gencb_st
 
struct  bn_mont_ctx_st
 

Macros

#define BN_FLG_MALLOCED   0x01
 
#define BN_FLG_STATIC_DATA   0x02
 
#define BN_GENCB_GENERATED   0
 
#define BN_GENCB_PRIME_TEST   1
 
#define BN_mod(rem, numerator, divisor, ctx)   BN_div(NULL, (rem), (numerator), (divisor), (ctx))
 
#define BN_prime_checks   BN_prime_checks_for_validation
 
#define BN_prime_checks_for_generation   0
 
#define BN_prime_checks_for_validation   64
 
#define BN_R_ARG2_LT_ARG3   100
 
#define BN_R_BAD_ENCODING   117
 
#define BN_R_BAD_RECIPROCAL   101
 
#define BN_R_BIGNUM_TOO_LONG   102
 
#define BN_R_BITS_TOO_SMALL   103
 
#define BN_R_CALLED_WITH_EVEN_MODULUS   104
 
#define BN_R_DIV_BY_ZERO   105
 
#define BN_R_ENCODE_ERROR   118
 
#define BN_R_EXPAND_ON_STATIC_BIGNUM_DATA   106
 
#define BN_R_INPUT_NOT_REDUCED   107
 
#define BN_R_INVALID_INPUT   119
 
#define BN_R_INVALID_RANGE   108
 
#define BN_R_NEGATIVE_NUMBER   109
 
#define BN_R_NO_INVERSE   112
 
#define BN_R_NOT_A_SQUARE   110
 
#define BN_R_NOT_INITIALIZED   111
 
#define BN_R_P_IS_NOT_PRIME   114
 
#define BN_R_PRIVATE_KEY_TOO_LARGE   113
 
#define BN_R_TOO_MANY_ITERATIONS   115
 
#define BN_R_TOO_MANY_TEMPORARY_VARIABLES   116
 
#define BN_RAND_BOTTOM_ANY   0
 
#define BN_RAND_BOTTOM_ODD   1
 
#define BN_RAND_TOP_ANY   (-1)
 
#define BN_RAND_TOP_ONE   0
 
#define BN_RAND_TOP_TWO   1
 

Enumerations

enum  bn_primality_result_t { bn_probably_prime, bn_composite, bn_non_prime_power_composite }
 

Functions

OPENSSL_EXPORT int BN_abs_is_word (const BIGNUM *bn, BN_ULONG w)
 
OPENSSL_EXPORT int BN_add (BIGNUM *r, const BIGNUM *a, const BIGNUM *b)
 
OPENSSL_EXPORT int BN_add_word (BIGNUM *a, BN_ULONG w)
 
OPENSSL_EXPORT int BN_asc2bn (BIGNUM **outp, const char *in)
 
OPENSSL_EXPORT BIGNUMBN_bin2bn (const uint8_t *in, size_t len, BIGNUM *ret)
 
OPENSSL_EXPORT size_t BN_bn2bin (const BIGNUM *in, uint8_t *out)
 
OPENSSL_EXPORT int BN_bn2bin_padded (uint8_t *out, size_t len, const BIGNUM *in)
 
OPENSSL_EXPORT int BN_bn2binpad (const BIGNUM *in, uint8_t *out, int len)
 
OPENSSL_EXPORT int BN_bn2cbb_padded (CBB *out, size_t len, const BIGNUM *in)
 
OPENSSL_EXPORT char * BN_bn2dec (const BIGNUM *a)
 
OPENSSL_EXPORT char * BN_bn2hex (const BIGNUM *bn)
 
OPENSSL_EXPORT int BN_bn2le_padded (uint8_t *out, size_t len, const BIGNUM *in)
 
OPENSSL_EXPORT size_t BN_bn2mpi (const BIGNUM *in, uint8_t *out)
 
OPENSSL_EXPORT void BN_clear (BIGNUM *bn)
 
OPENSSL_EXPORT int BN_clear_bit (BIGNUM *a, int n)
 
OPENSSL_EXPORT void BN_clear_free (BIGNUM *bn)
 
OPENSSL_EXPORT int BN_cmp (const BIGNUM *a, const BIGNUM *b)
 
OPENSSL_EXPORT int BN_cmp_word (const BIGNUM *a, BN_ULONG b)
 
OPENSSL_EXPORT BIGNUMBN_copy (BIGNUM *dest, const BIGNUM *src)
 
OPENSSL_EXPORT int BN_count_low_zero_bits (const BIGNUM *bn)
 
OPENSSL_EXPORT void BN_CTX_end (BN_CTX *ctx)
 
OPENSSL_EXPORT void BN_CTX_free (BN_CTX *ctx)
 
OPENSSL_EXPORT BIGNUMBN_CTX_get (BN_CTX *ctx)
 
OPENSSL_EXPORT BN_CTXBN_CTX_new (void)
 
OPENSSL_EXPORT void BN_CTX_start (BN_CTX *ctx)
 
OPENSSL_EXPORT int BN_dec2bn (BIGNUM **outp, const char *in)
 
OPENSSL_EXPORT int BN_div (BIGNUM *quotient, BIGNUM *rem, const BIGNUM *numerator, const BIGNUM *divisor, BN_CTX *ctx)
 
OPENSSL_EXPORT BN_ULONG BN_div_word (BIGNUM *numerator, BN_ULONG divisor)
 
OPENSSL_EXPORT BIGNUMBN_dup (const BIGNUM *src)
 
OPENSSL_EXPORT int BN_enhanced_miller_rabin_primality_test (enum bn_primality_result_t *out_result, const BIGNUM *w, int checks, BN_CTX *ctx, BN_GENCB *cb)
 
OPENSSL_EXPORT int BN_equal_consttime (const BIGNUM *a, const BIGNUM *b)
 
OPENSSL_EXPORT int BN_exp (BIGNUM *r, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx)
 
OPENSSL_EXPORT void BN_free (BIGNUM *bn)
 
OPENSSL_EXPORT int BN_from_montgomery (BIGNUM *ret, const BIGNUM *a, const BN_MONT_CTX *mont, BN_CTX *ctx)
 
OPENSSL_EXPORT int BN_gcd (BIGNUM *r, const BIGNUM *a, const BIGNUM *b, BN_CTX *ctx)
 
OPENSSL_EXPORT int BN_GENCB_call (BN_GENCB *callback, int event, int n)
 
OPENSSL_EXPORT void BN_GENCB_set (BN_GENCB *callback, int(*f)(int event, int n, BN_GENCB *), void *arg)
 
OPENSSL_EXPORT int BN_generate_prime_ex (BIGNUM *ret, int bits, int safe, const BIGNUM *add, const BIGNUM *rem, BN_GENCB *cb)
 
OPENSSL_EXPORT int BN_get_u64 (const BIGNUM *bn, uint64_t *out)
 
OPENSSL_EXPORT BN_ULONG BN_get_word (const BIGNUM *bn)
 
OPENSSL_EXPORT int BN_hex2bn (BIGNUM **outp, const char *in)
 
OPENSSL_EXPORT void BN_init (BIGNUM *bn)
 
OPENSSL_EXPORT int BN_is_bit_set (const BIGNUM *a, int n)
 
OPENSSL_EXPORT int BN_is_negative (const BIGNUM *bn)
 
OPENSSL_EXPORT int BN_is_odd (const BIGNUM *bn)
 
OPENSSL_EXPORT int BN_is_one (const BIGNUM *bn)
 
OPENSSL_EXPORT int BN_is_pow2 (const BIGNUM *a)
 
OPENSSL_EXPORT int BN_is_prime_ex (const BIGNUM *candidate, int checks, BN_CTX *ctx, BN_GENCB *cb)
 
OPENSSL_EXPORT int BN_is_prime_fasttest_ex (const BIGNUM *candidate, int checks, BN_CTX *ctx, int do_trial_division, BN_GENCB *cb)
 
OPENSSL_EXPORT int BN_is_word (const BIGNUM *bn, BN_ULONG w)
 
OPENSSL_EXPORT int BN_is_zero (const BIGNUM *bn)
 
OPENSSL_EXPORT BIGNUMBN_le2bn (const uint8_t *in, size_t len, BIGNUM *ret)
 
OPENSSL_EXPORT int BN_lshift (BIGNUM *r, const BIGNUM *a, int n)
 
OPENSSL_EXPORT int BN_lshift1 (BIGNUM *r, const BIGNUM *a)
 
OPENSSL_EXPORT int BN_marshal_asn1 (CBB *cbb, const BIGNUM *bn)
 
OPENSSL_EXPORT int BN_mask_bits (BIGNUM *a, int n)
 
OPENSSL_EXPORT int BN_mod_add (BIGNUM *r, const BIGNUM *a, const BIGNUM *b, const BIGNUM *m, BN_CTX *ctx)
 
OPENSSL_EXPORT int BN_mod_add_quick (BIGNUM *r, const BIGNUM *a, const BIGNUM *b, const BIGNUM *m)
 
OPENSSL_EXPORT int BN_mod_exp (BIGNUM *r, const BIGNUM *a, const BIGNUM *p, const BIGNUM *m, BN_CTX *ctx)
 
OPENSSL_EXPORT int BN_mod_exp2_mont (BIGNUM *r, const BIGNUM *a1, const BIGNUM *p1, const BIGNUM *a2, const BIGNUM *p2, const BIGNUM *m, BN_CTX *ctx, const BN_MONT_CTX *mont)
 
OPENSSL_EXPORT int BN_mod_exp_mont (BIGNUM *r, const BIGNUM *a, const BIGNUM *p, const BIGNUM *m, BN_CTX *ctx, const BN_MONT_CTX *mont)
 
OPENSSL_EXPORT int BN_mod_exp_mont_consttime (BIGNUM *rr, const BIGNUM *a, const BIGNUM *p, const BIGNUM *m, BN_CTX *ctx, const BN_MONT_CTX *mont)
 
OPENSSL_EXPORT int BN_mod_exp_mont_word (BIGNUM *r, BN_ULONG a, const BIGNUM *p, const BIGNUM *m, BN_CTX *ctx, const BN_MONT_CTX *mont)
 
OPENSSL_EXPORT BIGNUMBN_mod_inverse (BIGNUM *out, const BIGNUM *a, const BIGNUM *n, BN_CTX *ctx)
 
int BN_mod_inverse_blinded (BIGNUM *out, int *out_no_inverse, const BIGNUM *a, const BN_MONT_CTX *mont, BN_CTX *ctx)
 
int BN_mod_inverse_odd (BIGNUM *out, int *out_no_inverse, const BIGNUM *a, const BIGNUM *n, BN_CTX *ctx)
 
OPENSSL_EXPORT int BN_mod_lshift (BIGNUM *r, const BIGNUM *a, int n, const BIGNUM *m, BN_CTX *ctx)
 
OPENSSL_EXPORT int BN_mod_lshift1 (BIGNUM *r, const BIGNUM *a, const BIGNUM *m, BN_CTX *ctx)
 
OPENSSL_EXPORT int BN_mod_lshift1_quick (BIGNUM *r, const BIGNUM *a, const BIGNUM *m)
 
OPENSSL_EXPORT int BN_mod_lshift_quick (BIGNUM *r, const BIGNUM *a, int n, const BIGNUM *m)
 
OPENSSL_EXPORT int BN_mod_mul (BIGNUM *r, const BIGNUM *a, const BIGNUM *b, const BIGNUM *m, BN_CTX *ctx)
 
OPENSSL_EXPORT int BN_mod_mul_montgomery (BIGNUM *r, const BIGNUM *a, const BIGNUM *b, const BN_MONT_CTX *mont, BN_CTX *ctx)
 
OPENSSL_EXPORT int BN_mod_pow2 (BIGNUM *r, const BIGNUM *a, size_t e)
 
OPENSSL_EXPORT int BN_mod_sqr (BIGNUM *r, const BIGNUM *a, const BIGNUM *m, BN_CTX *ctx)
 
OPENSSL_EXPORT BIGNUMBN_mod_sqrt (BIGNUM *in, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx)
 
OPENSSL_EXPORT int BN_mod_sub (BIGNUM *r, const BIGNUM *a, const BIGNUM *b, const BIGNUM *m, BN_CTX *ctx)
 
OPENSSL_EXPORT int BN_mod_sub_quick (BIGNUM *r, const BIGNUM *a, const BIGNUM *b, const BIGNUM *m)
 
OPENSSL_EXPORT BN_ULONG BN_mod_word (const BIGNUM *a, BN_ULONG w)
 
OPENSSL_EXPORT BN_MONT_CTXBN_MONT_CTX_copy (BN_MONT_CTX *to, const BN_MONT_CTX *from)
 
OPENSSL_EXPORT void BN_MONT_CTX_free (BN_MONT_CTX *mont)
 
OPENSSL_EXPORT BN_MONT_CTXBN_MONT_CTX_new (void)
 
OPENSSL_EXPORT BN_MONT_CTXBN_MONT_CTX_new_consttime (const BIGNUM *mod, BN_CTX *ctx)
 
OPENSSL_EXPORT BN_MONT_CTXBN_MONT_CTX_new_for_modulus (const BIGNUM *mod, BN_CTX *ctx)
 
OPENSSL_EXPORT int BN_MONT_CTX_set (BN_MONT_CTX *mont, const BIGNUM *mod, BN_CTX *ctx)
 
int BN_MONT_CTX_set_locked (BN_MONT_CTX **pmont, CRYPTO_MUTEX *lock, const BIGNUM *mod, BN_CTX *bn_ctx)
 
OPENSSL_EXPORT BIGNUMBN_mpi2bn (const uint8_t *in, size_t len, BIGNUM *out)
 
OPENSSL_EXPORT int BN_mul (BIGNUM *r, const BIGNUM *a, const BIGNUM *b, BN_CTX *ctx)
 
OPENSSL_EXPORT int BN_mul_word (BIGNUM *bn, BN_ULONG w)
 
OPENSSL_EXPORT BIGNUMBN_new (void)
 
OPENSSL_EXPORT int BN_nnmod (BIGNUM *rem, const BIGNUM *numerator, const BIGNUM *divisor, BN_CTX *ctx)
 
OPENSSL_EXPORT int BN_nnmod_pow2 (BIGNUM *r, const BIGNUM *a, size_t e)
 
OPENSSL_EXPORT unsigned BN_num_bits (const BIGNUM *bn)
 
OPENSSL_EXPORT unsigned BN_num_bits_word (BN_ULONG l)
 
OPENSSL_EXPORT unsigned BN_num_bytes (const BIGNUM *bn)
 
OPENSSL_EXPORT int BN_one (BIGNUM *bn)
 
OPENSSL_EXPORT int BN_parse_asn1_unsigned (CBS *cbs, BIGNUM *ret)
 
OPENSSL_EXPORT int BN_primality_test (int *is_probably_prime, const BIGNUM *candidate, int checks, BN_CTX *ctx, int do_trial_division, BN_GENCB *cb)
 
OPENSSL_EXPORT int BN_print (BIO *bio, const BIGNUM *a)
 
OPENSSL_EXPORT int BN_print_fp (FILE *fp, const BIGNUM *a)
 
OPENSSL_EXPORT int BN_pseudo_rand (BIGNUM *rnd, int bits, int top, int bottom)
 
OPENSSL_EXPORT int BN_pseudo_rand_range (BIGNUM *rnd, const BIGNUM *range)
 
OPENSSL_EXPORT int BN_rand (BIGNUM *rnd, int bits, int top, int bottom)
 
OPENSSL_EXPORT int BN_rand_range (BIGNUM *rnd, const BIGNUM *range)
 
OPENSSL_EXPORT int BN_rand_range_ex (BIGNUM *r, BN_ULONG min_inclusive, const BIGNUM *max_exclusive)
 
OPENSSL_EXPORT int BN_rshift (BIGNUM *r, const BIGNUM *a, int n)
 
OPENSSL_EXPORT int BN_rshift1 (BIGNUM *r, const BIGNUM *a)
 
OPENSSL_EXPORT int BN_set_bit (BIGNUM *a, int n)
 
OPENSSL_EXPORT void BN_set_negative (BIGNUM *bn, int sign)
 
OPENSSL_EXPORT int BN_set_u64 (BIGNUM *bn, uint64_t value)
 
OPENSSL_EXPORT int BN_set_word (BIGNUM *bn, BN_ULONG value)
 
OPENSSL_EXPORT int BN_sqr (BIGNUM *r, const BIGNUM *a, BN_CTX *ctx)
 
OPENSSL_EXPORT int BN_sqrt (BIGNUM *out_sqrt, const BIGNUM *in, BN_CTX *ctx)
 
OPENSSL_EXPORT int BN_sub (BIGNUM *r, const BIGNUM *a, const BIGNUM *b)
 
OPENSSL_EXPORT int BN_sub_word (BIGNUM *a, BN_ULONG w)
 
OPENSSL_EXPORT int BN_to_montgomery (BIGNUM *ret, const BIGNUM *a, const BN_MONT_CTX *mont, BN_CTX *ctx)
 
OPENSSL_EXPORT int BN_uadd (BIGNUM *r, const BIGNUM *a, const BIGNUM *b)
 
OPENSSL_EXPORT int BN_ucmp (const BIGNUM *a, const BIGNUM *b)
 
OPENSSL_EXPORT int BN_usub (BIGNUM *r, const BIGNUM *a, const BIGNUM *b)
 
const OPENSSL_EXPORT BIGNUMBN_value_one (void)
 
OPENSSL_EXPORT void BN_zero (BIGNUM *bn)
 

Macro Definition Documentation

◆ BN_FLG_MALLOCED

#define BN_FLG_MALLOCED   0x01

Definition at line 996 of file bn.h.

◆ BN_FLG_STATIC_DATA

#define BN_FLG_STATIC_DATA   0x02

Definition at line 997 of file bn.h.

◆ BN_GENCB_GENERATED

#define BN_GENCB_GENERATED   0

Definition at line 635 of file bn.h.

◆ BN_GENCB_PRIME_TEST

#define BN_GENCB_PRIME_TEST   1

Definition at line 636 of file bn.h.

◆ BN_mod

#define BN_mod (   rem,
  numerator,
  divisor,
  ctx 
)    BN_div(NULL, (rem), (numerator), (divisor), (ctx))

Definition at line 527 of file bn.h.

◆ BN_prime_checks

#define BN_prime_checks   BN_prime_checks_for_validation

Definition at line 952 of file bn.h.

◆ BN_prime_checks_for_generation

#define BN_prime_checks_for_generation   0

Definition at line 702 of file bn.h.

◆ BN_prime_checks_for_validation

#define BN_prime_checks_for_validation   64

Definition at line 692 of file bn.h.

◆ BN_R_ARG2_LT_ARG3

#define BN_R_ARG2_LT_ARG3   100

Definition at line 1036 of file bn.h.

◆ BN_R_BAD_ENCODING

#define BN_R_BAD_ENCODING   117

Definition at line 1053 of file bn.h.

◆ BN_R_BAD_RECIPROCAL

#define BN_R_BAD_RECIPROCAL   101

Definition at line 1037 of file bn.h.

◆ BN_R_BIGNUM_TOO_LONG

#define BN_R_BIGNUM_TOO_LONG   102

Definition at line 1038 of file bn.h.

◆ BN_R_BITS_TOO_SMALL

#define BN_R_BITS_TOO_SMALL   103

Definition at line 1039 of file bn.h.

◆ BN_R_CALLED_WITH_EVEN_MODULUS

#define BN_R_CALLED_WITH_EVEN_MODULUS   104

Definition at line 1040 of file bn.h.

◆ BN_R_DIV_BY_ZERO

#define BN_R_DIV_BY_ZERO   105

Definition at line 1041 of file bn.h.

◆ BN_R_ENCODE_ERROR

#define BN_R_ENCODE_ERROR   118

Definition at line 1054 of file bn.h.

◆ BN_R_EXPAND_ON_STATIC_BIGNUM_DATA

#define BN_R_EXPAND_ON_STATIC_BIGNUM_DATA   106

Definition at line 1042 of file bn.h.

◆ BN_R_INPUT_NOT_REDUCED

#define BN_R_INPUT_NOT_REDUCED   107

Definition at line 1043 of file bn.h.

◆ BN_R_INVALID_INPUT

#define BN_R_INVALID_INPUT   119

Definition at line 1055 of file bn.h.

◆ BN_R_INVALID_RANGE

#define BN_R_INVALID_RANGE   108

Definition at line 1044 of file bn.h.

◆ BN_R_NEGATIVE_NUMBER

#define BN_R_NEGATIVE_NUMBER   109

Definition at line 1045 of file bn.h.

◆ BN_R_NO_INVERSE

#define BN_R_NO_INVERSE   112

Definition at line 1048 of file bn.h.

◆ BN_R_NOT_A_SQUARE

#define BN_R_NOT_A_SQUARE   110

Definition at line 1046 of file bn.h.

◆ BN_R_NOT_INITIALIZED

#define BN_R_NOT_INITIALIZED   111

Definition at line 1047 of file bn.h.

◆ BN_R_P_IS_NOT_PRIME

#define BN_R_P_IS_NOT_PRIME   114

Definition at line 1050 of file bn.h.

◆ BN_R_PRIVATE_KEY_TOO_LARGE

#define BN_R_PRIVATE_KEY_TOO_LARGE   113

Definition at line 1049 of file bn.h.

◆ BN_R_TOO_MANY_ITERATIONS

#define BN_R_TOO_MANY_ITERATIONS   115

Definition at line 1051 of file bn.h.

◆ BN_R_TOO_MANY_TEMPORARY_VARIABLES

#define BN_R_TOO_MANY_TEMPORARY_VARIABLES   116

Definition at line 1052 of file bn.h.

◆ BN_RAND_BOTTOM_ANY

#define BN_RAND_BOTTOM_ANY   0

Definition at line 602 of file bn.h.

◆ BN_RAND_BOTTOM_ODD

#define BN_RAND_BOTTOM_ODD   1

Definition at line 603 of file bn.h.

◆ BN_RAND_TOP_ANY

#define BN_RAND_TOP_ANY   (-1)

Definition at line 597 of file bn.h.

◆ BN_RAND_TOP_ONE

#define BN_RAND_TOP_ONE   0

Definition at line 598 of file bn.h.

◆ BN_RAND_TOP_TWO

#define BN_RAND_TOP_TWO   1

Definition at line 599 of file bn.h.

Enumeration Type Documentation

◆ bn_primality_result_t

Enumerator
bn_probably_prime 
bn_composite 
bn_non_prime_power_composite 

Definition at line 705 of file bn.h.

Function Documentation

◆ BN_abs_is_word()

OPENSSL_EXPORT int BN_abs_is_word ( const BIGNUM bn,
BN_ULONG  w 
)

Definition at line 130 of file cmp.c.

◆ BN_add()

OPENSSL_EXPORT int BN_add ( BIGNUM r,
const BIGNUM a,
const BIGNUM b 
)

Definition at line 67 of file add.c.

◆ BN_add_word()

OPENSSL_EXPORT int BN_add_word ( BIGNUM a,
BN_ULONG  w 
)

Definition at line 138 of file add.c.

◆ BN_asc2bn()

OPENSSL_EXPORT int BN_asc2bn ( BIGNUM **  outp,
const char *  in 
)

◆ BN_bin2bn()

OPENSSL_EXPORT BIGNUM* BN_bin2bn ( const uint8_t in,
size_t  len,
BIGNUM ret 
)

Definition at line 65 of file bytes.c.

◆ BN_bn2bin()

OPENSSL_EXPORT size_t BN_bn2bin ( const BIGNUM in,
uint8_t out 
)

Definition at line 145 of file bytes.c.

◆ BN_bn2bin_padded()

OPENSSL_EXPORT int BN_bn2bin_padded ( uint8_t out,
size_t  len,
const BIGNUM in 
)

Definition at line 183 of file bytes.c.

◆ BN_bn2binpad()

OPENSSL_EXPORT int BN_bn2binpad ( const BIGNUM in,
uint8_t out,
int  len 
)

◆ BN_bn2cbb_padded()

OPENSSL_EXPORT int BN_bn2cbb_padded ( CBB out,
size_t  len,
const BIGNUM in 
)

◆ BN_bn2dec()

OPENSSL_EXPORT char* BN_bn2dec ( const BIGNUM a)

◆ BN_bn2hex()

OPENSSL_EXPORT char* BN_bn2hex ( const BIGNUM bn)

◆ BN_bn2le_padded()

OPENSSL_EXPORT int BN_bn2le_padded ( uint8_t out,
size_t  len,
const BIGNUM in 
)

Definition at line 165 of file bytes.c.

◆ BN_bn2mpi()

OPENSSL_EXPORT size_t BN_bn2mpi ( const BIGNUM in,
uint8_t out 
)

◆ BN_clear()

OPENSSL_EXPORT void BN_clear ( BIGNUM bn)

Definition at line 143 of file bn.c.

◆ BN_clear_bit()

OPENSSL_EXPORT int BN_clear_bit ( BIGNUM a,
int  n 
)

Definition at line 243 of file shift.c.

◆ BN_clear_free()

OPENSSL_EXPORT void BN_clear_free ( BIGNUM bn)

Definition at line 103 of file bn.c.

◆ BN_cmp()

OPENSSL_EXPORT int BN_cmp ( const BIGNUM a,
const BIGNUM b 
)

Definition at line 102 of file cmp.c.

◆ BN_cmp_word()

OPENSSL_EXPORT int BN_cmp_word ( const BIGNUM a,
BN_ULONG  b 
)

Definition at line 141 of file cmp.c.

◆ BN_copy()

OPENSSL_EXPORT BIGNUM* BN_copy ( BIGNUM dest,
const BIGNUM src 
)

Definition at line 127 of file bn.c.

◆ BN_count_low_zero_bits()

OPENSSL_EXPORT int BN_count_low_zero_bits ( const BIGNUM bn)

Definition at line 344 of file shift.c.

◆ BN_CTX_end()

OPENSSL_EXPORT void BN_CTX_end ( BN_CTX ctx)

Definition at line 188 of file ctx.c.

◆ BN_CTX_free()

OPENSSL_EXPORT void BN_CTX_free ( BN_CTX ctx)

Definition at line 124 of file ctx.c.

◆ BN_CTX_get()

OPENSSL_EXPORT BIGNUM* BN_CTX_get ( BN_CTX ctx)

Definition at line 152 of file ctx.c.

◆ BN_CTX_new()

OPENSSL_EXPORT BN_CTX* BN_CTX_new ( void  )

Definition at line 108 of file ctx.c.

◆ BN_CTX_start()

OPENSSL_EXPORT void BN_CTX_start ( BN_CTX ctx)

Definition at line 138 of file ctx.c.

◆ BN_dec2bn()

OPENSSL_EXPORT int BN_dec2bn ( BIGNUM **  outp,
const char *  in 
)

◆ BN_div()

OPENSSL_EXPORT int BN_div ( BIGNUM quotient,
BIGNUM rem,
const BIGNUM numerator,
const BIGNUM divisor,
BN_CTX ctx 
)

Definition at line 194 of file div.c.

◆ BN_div_word()

OPENSSL_EXPORT BN_ULONG BN_div_word ( BIGNUM numerator,
BN_ULONG  divisor 
)

Definition at line 754 of file div.c.

◆ BN_dup()

OPENSSL_EXPORT BIGNUM* BN_dup ( const BIGNUM src)

Definition at line 107 of file bn.c.

◆ BN_enhanced_miller_rabin_primality_test()

OPENSSL_EXPORT int BN_enhanced_miller_rabin_primality_test ( enum bn_primality_result_t out_result,
const BIGNUM w,
int  checks,
BN_CTX ctx,
BN_GENCB cb 
)

Definition at line 789 of file prime.c.

◆ BN_equal_consttime()

OPENSSL_EXPORT int BN_equal_consttime ( const BIGNUM a,
const BIGNUM b 
)

Definition at line 183 of file cmp.c.

◆ BN_exp()

OPENSSL_EXPORT int BN_exp ( BIGNUM r,
const BIGNUM a,
const BIGNUM p,
BN_CTX ctx 
)

Definition at line 123 of file exponentiation.c.

◆ BN_free()

OPENSSL_EXPORT void BN_free ( BIGNUM bn)

Definition at line 87 of file bn.c.

◆ BN_from_montgomery()

OPENSSL_EXPORT int BN_from_montgomery ( BIGNUM ret,
const BIGNUM a,
const BN_MONT_CTX mont,
BN_CTX ctx 
)

Definition at line 343 of file montgomery.c.

◆ BN_gcd()

OPENSSL_EXPORT int BN_gcd ( BIGNUM r,
const BIGNUM a,
const BIGNUM b,
BN_CTX ctx 
)

Definition at line 122 of file gcd_extra.c.

◆ BN_GENCB_call()

OPENSSL_EXPORT int BN_GENCB_call ( BN_GENCB callback,
int  event,
int  n 
)

Definition at line 369 of file prime.c.

◆ BN_GENCB_set()

OPENSSL_EXPORT void BN_GENCB_set ( BN_GENCB callback,
int(*)(int event, int n, BN_GENCB *)  f,
void *  arg 
)

◆ BN_generate_prime_ex()

OPENSSL_EXPORT int BN_generate_prime_ex ( BIGNUM ret,
int  bits,
int  safe,
const BIGNUM add,
const BIGNUM rem,
BN_GENCB cb 
)

Definition at line 377 of file prime.c.

◆ BN_get_u64()

OPENSSL_EXPORT int BN_get_u64 ( const BIGNUM bn,
uint64_t out 
)

Definition at line 214 of file bytes.c.

◆ BN_get_word()

OPENSSL_EXPORT BN_ULONG BN_get_word ( const BIGNUM bn)

Definition at line 203 of file bytes.c.

◆ BN_hex2bn()

OPENSSL_EXPORT int BN_hex2bn ( BIGNUM **  outp,
const char *  in 
)

◆ BN_init()

OPENSSL_EXPORT void BN_init ( BIGNUM bn)

Definition at line 83 of file bn.c.

◆ BN_is_bit_set()

OPENSSL_EXPORT int BN_is_bit_set ( const BIGNUM a,
int  n 
)

Definition at line 270 of file shift.c.

◆ BN_is_negative()

OPENSSL_EXPORT int BN_is_negative ( const BIGNUM bn)

Definition at line 327 of file bn.c.

◆ BN_is_odd()

OPENSSL_EXPORT int BN_is_odd ( const BIGNUM bn)

Definition at line 164 of file cmp.c.

◆ BN_is_one()

OPENSSL_EXPORT int BN_is_one ( const BIGNUM bn)

Definition at line 156 of file cmp.c.

◆ BN_is_pow2()

OPENSSL_EXPORT int BN_is_pow2 ( const BIGNUM a)

Definition at line 168 of file cmp.c.

◆ BN_is_prime_ex()

OPENSSL_EXPORT int BN_is_prime_ex ( const BIGNUM candidate,
int  checks,
BN_CTX ctx,
BN_GENCB cb 
)

Definition at line 774 of file prime.c.

◆ BN_is_prime_fasttest_ex()

OPENSSL_EXPORT int BN_is_prime_fasttest_ex ( const BIGNUM candidate,
int  checks,
BN_CTX ctx,
int  do_trial_division,
BN_GENCB cb 
)

Definition at line 779 of file prime.c.

◆ BN_is_word()

OPENSSL_EXPORT int BN_is_word ( const BIGNUM bn,
BN_ULONG  w 
)

Definition at line 160 of file cmp.c.

◆ BN_is_zero()

OPENSSL_EXPORT int BN_is_zero ( const BIGNUM bn)

Definition at line 152 of file cmp.c.

◆ BN_le2bn()

OPENSSL_EXPORT BIGNUM* BN_le2bn ( const uint8_t in,
size_t  len,
BIGNUM ret 
)

Definition at line 111 of file bytes.c.

◆ BN_lshift()

OPENSSL_EXPORT int BN_lshift ( BIGNUM r,
const BIGNUM a,
int  n 
)

Definition at line 67 of file shift.c.

◆ BN_lshift1()

OPENSSL_EXPORT int BN_lshift1 ( BIGNUM r,
const BIGNUM a 
)

Definition at line 105 of file shift.c.

◆ BN_marshal_asn1()

OPENSSL_EXPORT int BN_marshal_asn1 ( CBB cbb,
const BIGNUM bn 
)

Definition at line 38 of file bn_asn1.c.

◆ BN_mask_bits()

OPENSSL_EXPORT int BN_mask_bits ( BIGNUM a,
int  n 
)

Definition at line 277 of file shift.c.

◆ BN_mod_add()

OPENSSL_EXPORT int BN_mod_add ( BIGNUM r,
const BIGNUM a,
const BIGNUM b,
const BIGNUM m,
BN_CTX ctx 
)

Definition at line 580 of file div.c.

◆ BN_mod_add_quick()

OPENSSL_EXPORT int BN_mod_add_quick ( BIGNUM r,
const BIGNUM a,
const BIGNUM b,
const BIGNUM m 
)

Definition at line 588 of file div.c.

◆ BN_mod_exp()

OPENSSL_EXPORT int BN_mod_exp ( BIGNUM r,
const BIGNUM a,
const BIGNUM p,
const BIGNUM m,
BN_CTX ctx 
)

Definition at line 567 of file exponentiation.c.

◆ BN_mod_exp2_mont()

OPENSSL_EXPORT int BN_mod_exp2_mont ( BIGNUM r,
const BIGNUM a1,
const BIGNUM p1,
const BIGNUM a2,
const BIGNUM p2,
const BIGNUM m,
BN_CTX ctx,
const BN_MONT_CTX mont 
)

Definition at line 1253 of file exponentiation.c.

◆ BN_mod_exp_mont()

OPENSSL_EXPORT int BN_mod_exp_mont ( BIGNUM r,
const BIGNUM a,
const BIGNUM p,
const BIGNUM m,
BN_CTX ctx,
const BN_MONT_CTX mont 
)

Definition at line 587 of file exponentiation.c.

◆ BN_mod_exp_mont_consttime()

OPENSSL_EXPORT int BN_mod_exp_mont_consttime ( BIGNUM rr,
const BIGNUM a,
const BIGNUM p,
const BIGNUM m,
BN_CTX ctx,
const BN_MONT_CTX mont 
)

Definition at line 901 of file exponentiation.c.

◆ BN_mod_exp_mont_word()

OPENSSL_EXPORT int BN_mod_exp_mont_word ( BIGNUM r,
BN_ULONG  a,
const BIGNUM p,
const BIGNUM m,
BN_CTX ctx,
const BN_MONT_CTX mont 
)

Definition at line 1225 of file exponentiation.c.

◆ BN_mod_inverse()

OPENSSL_EXPORT BIGNUM* BN_mod_inverse ( BIGNUM out,
const BIGNUM a,
const BIGNUM n,
BN_CTX ctx 
)

Definition at line 283 of file gcd.c.

◆ BN_mod_inverse_blinded()

int BN_mod_inverse_blinded ( BIGNUM out,
int out_no_inverse,
const BIGNUM a,
const BN_MONT_CTX mont,
BN_CTX ctx 
)

Definition at line 328 of file gcd.c.

◆ BN_mod_inverse_odd()

int BN_mod_inverse_odd ( BIGNUM out,
int out_no_inverse,
const BIGNUM a,
const BIGNUM n,
BN_CTX ctx 
)

Definition at line 116 of file gcd.c.

◆ BN_mod_lshift()

OPENSSL_EXPORT int BN_mod_lshift ( BIGNUM r,
const BIGNUM a,
int  n,
const BIGNUM m,
BN_CTX ctx 
)

Definition at line 689 of file div.c.

◆ BN_mod_lshift1()

OPENSSL_EXPORT int BN_mod_lshift1 ( BIGNUM r,
const BIGNUM a,
const BIGNUM m,
BN_CTX ctx 
)

Definition at line 733 of file div.c.

◆ BN_mod_lshift1_quick()

OPENSSL_EXPORT int BN_mod_lshift1_quick ( BIGNUM r,
const BIGNUM a,
const BIGNUM m 
)

Definition at line 746 of file div.c.

◆ BN_mod_lshift_quick()

OPENSSL_EXPORT int BN_mod_lshift_quick ( BIGNUM r,
const BIGNUM a,
int  n,
const BIGNUM m 
)

Definition at line 725 of file div.c.

◆ BN_mod_mul()

OPENSSL_EXPORT int BN_mod_mul ( BIGNUM r,
const BIGNUM a,
const BIGNUM b,
const BIGNUM m,
BN_CTX ctx 
)

Definition at line 648 of file div.c.

◆ BN_mod_mul_montgomery()

OPENSSL_EXPORT int BN_mod_mul_montgomery ( BIGNUM r,
const BIGNUM a,
const BIGNUM b,
const BN_MONT_CTX mont,
BN_CTX ctx 
)

Definition at line 417 of file montgomery.c.

◆ BN_mod_pow2()

OPENSSL_EXPORT int BN_mod_pow2 ( BIGNUM r,
const BIGNUM a,
size_t  e 
)

Definition at line 825 of file div.c.

◆ BN_mod_sqr()

OPENSSL_EXPORT int BN_mod_sqr ( BIGNUM r,
const BIGNUM a,
const BIGNUM m,
BN_CTX ctx 
)

Definition at line 680 of file div.c.

◆ BN_mod_sqrt()

OPENSSL_EXPORT BIGNUM* BN_mod_sqrt ( BIGNUM in,
const BIGNUM a,
const BIGNUM p,
BN_CTX ctx 
)

Definition at line 62 of file sqrt.c.

◆ BN_mod_sub()

OPENSSL_EXPORT int BN_mod_sub ( BIGNUM r,
const BIGNUM a,
const BIGNUM b,
const BIGNUM m,
BN_CTX ctx 
)

Definition at line 614 of file div.c.

◆ BN_mod_sub_quick()

OPENSSL_EXPORT int BN_mod_sub_quick ( BIGNUM r,
const BIGNUM a,
const BIGNUM b,
const BIGNUM m 
)

Definition at line 639 of file div.c.

◆ BN_mod_word()

OPENSSL_EXPORT BN_ULONG BN_mod_word ( const BIGNUM a,
BN_ULONG  w 
)

Definition at line 788 of file div.c.

◆ BN_MONT_CTX_copy()

OPENSSL_EXPORT BN_MONT_CTX* BN_MONT_CTX_copy ( BN_MONT_CTX to,
const BN_MONT_CTX from 
)

Definition at line 149 of file montgomery.c.

◆ BN_MONT_CTX_free()

OPENSSL_EXPORT void BN_MONT_CTX_free ( BN_MONT_CTX mont)

Definition at line 139 of file montgomery.c.

◆ BN_MONT_CTX_new()

OPENSSL_EXPORT BN_MONT_CTX* BN_MONT_CTX_new ( void  )

Definition at line 125 of file montgomery.c.

◆ BN_MONT_CTX_new_consttime()

OPENSSL_EXPORT BN_MONT_CTX* BN_MONT_CTX_new_consttime ( const BIGNUM mod,
BN_CTX ctx 
)

Definition at line 246 of file montgomery.c.

◆ BN_MONT_CTX_new_for_modulus()

OPENSSL_EXPORT BN_MONT_CTX* BN_MONT_CTX_new_for_modulus ( const BIGNUM mod,
BN_CTX ctx 
)

Definition at line 236 of file montgomery.c.

◆ BN_MONT_CTX_set()

OPENSSL_EXPORT int BN_MONT_CTX_set ( BN_MONT_CTX mont,
const BIGNUM mod,
BN_CTX ctx 
)

Definition at line 208 of file montgomery.c.

◆ BN_MONT_CTX_set_locked()

int BN_MONT_CTX_set_locked ( BN_MONT_CTX **  pmont,
CRYPTO_MUTEX lock,
const BIGNUM mod,
BN_CTX bn_ctx 
)

Definition at line 264 of file montgomery.c.

◆ BN_mpi2bn()

OPENSSL_EXPORT BIGNUM* BN_mpi2bn ( const uint8_t in,
size_t  len,
BIGNUM out 
)

◆ BN_mul()

OPENSSL_EXPORT int BN_mul ( BIGNUM r,
const BIGNUM a,
const BIGNUM b,
BN_CTX ctx 
)

Definition at line 516 of file mul.c.

◆ BN_mul_word()

OPENSSL_EXPORT int BN_mul_word ( BIGNUM bn,
BN_ULONG  w 
)

Definition at line 648 of file mul.c.

◆ BN_new()

OPENSSL_EXPORT BIGNUM* BN_new ( void  )

Definition at line 69 of file bn.c.

◆ BN_nnmod()

OPENSSL_EXPORT int BN_nnmod ( BIGNUM rem,
const BIGNUM numerator,
const BIGNUM divisor,
BN_CTX ctx 
)

Definition at line 401 of file div.c.

◆ BN_nnmod_pow2()

OPENSSL_EXPORT int BN_nnmod_pow2 ( BIGNUM r,
const BIGNUM a,
size_t  e 
)

Definition at line 860 of file div.c.

◆ BN_num_bits()

OPENSSL_EXPORT unsigned BN_num_bits ( const BIGNUM bn)

Definition at line 216 of file bn.c.

◆ BN_num_bits_word()

OPENSSL_EXPORT unsigned BN_num_bits_word ( BN_ULONG  l)

Definition at line 163 of file bn.c.

◆ BN_num_bytes()

OPENSSL_EXPORT unsigned BN_num_bytes ( const BIGNUM bn)

Definition at line 225 of file bn.c.

◆ BN_one()

OPENSSL_EXPORT int BN_one ( BIGNUM bn)

Definition at line 233 of file bn.c.

◆ BN_parse_asn1_unsigned()

OPENSSL_EXPORT int BN_parse_asn1_unsigned ( CBS cbs,
BIGNUM ret 
)

Definition at line 21 of file bn_asn1.c.

◆ BN_primality_test()

OPENSSL_EXPORT int BN_primality_test ( int is_probably_prime,
const BIGNUM candidate,
int  checks,
BN_CTX ctx,
int  do_trial_division,
BN_GENCB cb 
)

Definition at line 603 of file prime.c.

◆ BN_print()

OPENSSL_EXPORT int BN_print ( BIO bio,
const BIGNUM a 
)

◆ BN_print_fp()

OPENSSL_EXPORT int BN_print_fp ( FILE *  fp,
const BIGNUM a 
)

◆ BN_pseudo_rand()

OPENSSL_EXPORT int BN_pseudo_rand ( BIGNUM rnd,
int  bits,
int  top,
int  bottom 
)

◆ BN_pseudo_rand_range()

OPENSSL_EXPORT int BN_pseudo_rand_range ( BIGNUM rnd,
const BIGNUM range 
)

◆ BN_rand()

OPENSSL_EXPORT int BN_rand ( BIGNUM rnd,
int  bits,
int  top,
int  bottom 
)

◆ BN_rand_range()

OPENSSL_EXPORT int BN_rand_range ( BIGNUM rnd,
const BIGNUM range 
)

◆ BN_rand_range_ex()

OPENSSL_EXPORT int BN_rand_range_ex ( BIGNUM r,
BN_ULONG  min_inclusive,
const BIGNUM max_exclusive 
)

◆ BN_rshift()

OPENSSL_EXPORT int BN_rshift ( BIGNUM r,
const BIGNUM a,
int  n 
)

Definition at line 156 of file shift.c.

◆ BN_rshift1()

OPENSSL_EXPORT int BN_rshift1 ( BIGNUM r,
const BIGNUM a 
)

Definition at line 210 of file shift.c.

◆ BN_set_bit()

OPENSSL_EXPORT int BN_set_bit ( BIGNUM a,
int  n 
)

Definition at line 221 of file shift.c.

◆ BN_set_negative()

OPENSSL_EXPORT void BN_set_negative ( BIGNUM bn,
int  sign 
)

Definition at line 331 of file bn.c.

◆ BN_set_u64()

OPENSSL_EXPORT int BN_set_u64 ( BIGNUM bn,
uint64_t  value 
)

Definition at line 253 of file bn.c.

◆ BN_set_word()

OPENSSL_EXPORT int BN_set_word ( BIGNUM bn,
BN_ULONG  value 
)

Definition at line 237 of file bn.c.

◆ BN_sqr()

OPENSSL_EXPORT int BN_sqr ( BIGNUM r,
const BIGNUM a,
BN_CTX ctx 
)

Definition at line 727 of file mul.c.

◆ BN_sqrt()

OPENSSL_EXPORT int BN_sqrt ( BIGNUM out_sqrt,
const BIGNUM in,
BN_CTX ctx 
)

Definition at line 423 of file sqrt.c.

◆ BN_sub()

OPENSSL_EXPORT int BN_sub ( BIGNUM r,
const BIGNUM a,
const BIGNUM b 
)

Definition at line 178 of file add.c.

◆ BN_sub_word()

OPENSSL_EXPORT int BN_sub_word ( BIGNUM a,
BN_ULONG  w 
)

Definition at line 268 of file add.c.

◆ BN_to_montgomery()

OPENSSL_EXPORT int BN_to_montgomery ( BIGNUM ret,
const BIGNUM a,
const BN_MONT_CTX mont,
BN_CTX ctx 
)

Definition at line 283 of file montgomery.c.

◆ BN_uadd()

OPENSSL_EXPORT int BN_uadd ( BIGNUM r,
const BIGNUM a,
const BIGNUM b 
)

Definition at line 130 of file add.c.

◆ BN_ucmp()

OPENSSL_EXPORT int BN_ucmp ( const BIGNUM a,
const BIGNUM b 
)

Definition at line 98 of file cmp.c.

◆ BN_usub()

OPENSSL_EXPORT int BN_usub ( BIGNUM r,
const BIGNUM a,
const BIGNUM b 
)

Definition at line 260 of file add.c.

◆ BN_value_one()

const OPENSSL_EXPORT BIGNUM* BN_value_one ( void  )

◆ BN_zero()

OPENSSL_EXPORT void BN_zero ( BIGNUM bn)

Definition at line 229 of file bn.c.



grpc
Author(s):
autogenerated on Fri May 16 2025 03:01:04