Lines Matching refs:BIGNUM
181 OPENSSL_EXPORT BIGNUM *BN_new(void);
184 OPENSSL_EXPORT void BN_init(BIGNUM *bn);
188 OPENSSL_EXPORT void BN_free(BIGNUM *bn);
192 OPENSSL_EXPORT void BN_clear_free(BIGNUM *bn);
196 OPENSSL_EXPORT BIGNUM *BN_dup(const BIGNUM *src);
200 OPENSSL_EXPORT BIGNUM *BN_copy(BIGNUM *dest, const BIGNUM *src);
203 OPENSSL_EXPORT void BN_clear(BIGNUM *bn);
206 OPENSSL_EXPORT const BIGNUM *BN_value_one(void);
213 OPENSSL_EXPORT unsigned BN_num_bits(const BIGNUM *bn);
221 OPENSSL_EXPORT unsigned BN_num_bytes(const BIGNUM *bn);
224 OPENSSL_EXPORT void BN_zero(BIGNUM *bn);
228 OPENSSL_EXPORT int BN_one(BIGNUM *bn);
232 OPENSSL_EXPORT int BN_set_word(BIGNUM *bn, BN_ULONG value);
236 OPENSSL_EXPORT int BN_set_u64(BIGNUM *bn, uint64_t value);
239 OPENSSL_EXPORT void BN_set_negative(BIGNUM *bn, int sign);
242 OPENSSL_EXPORT int BN_is_negative(const BIGNUM *bn);
251 OPENSSL_EXPORT BIGNUM *BN_bin2bn(const uint8_t *in, size_t len, BIGNUM *ret);
257 OPENSSL_EXPORT size_t BN_bn2bin(const BIGNUM *in, uint8_t *out);
263 OPENSSL_EXPORT BIGNUM *BN_le2bn(const uint8_t *in, size_t len, BIGNUM *ret);
269 OPENSSL_EXPORT int BN_bn2le_padded(uint8_t *out, size_t len, const BIGNUM *in);
275 OPENSSL_EXPORT int BN_bn2bin_padded(uint8_t *out, size_t len, const BIGNUM *in);
278 OPENSSL_EXPORT int BN_bn2cbb_padded(CBB *out, size_t len, const BIGNUM *in);
283 OPENSSL_EXPORT char *BN_bn2hex(const BIGNUM *bn);
291 OPENSSL_EXPORT int BN_hex2bn(BIGNUM **outp, const char *in);
300 OPENSSL_EXPORT char *BN_bn2dec(const BIGNUM *a);
312 OPENSSL_EXPORT int BN_dec2bn(BIGNUM **outp, const char *in);
318 OPENSSL_EXPORT int BN_asc2bn(BIGNUM **outp, const char *in);
322 OPENSSL_EXPORT int BN_print(BIO *bio, const BIGNUM *a);
325 OPENSSL_EXPORT int BN_print_fp(FILE *fp, const BIGNUM *a);
330 OPENSSL_EXPORT BN_ULONG BN_get_word(const BIGNUM *bn);
335 OPENSSL_EXPORT int BN_get_u64(const BIGNUM *bn, uint64_t *out);
342 OPENSSL_EXPORT int BN_parse_asn1_unsigned(CBS *cbs, BIGNUM *ret);
346 OPENSSL_EXPORT int BN_marshal_asn1(CBB *cbb, const BIGNUM *bn);
379 OPENSSL_EXPORT BIGNUM *BN_CTX_get(BN_CTX *ctx);
390 OPENSSL_EXPORT int BN_add(BIGNUM *r, const BIGNUM *a, const BIGNUM *b);
395 OPENSSL_EXPORT int BN_uadd(BIGNUM *r, const BIGNUM *a, const BIGNUM *b);
398 OPENSSL_EXPORT int BN_add_word(BIGNUM *a, BN_ULONG w);
402 OPENSSL_EXPORT int BN_sub(BIGNUM *r, const BIGNUM *a, const BIGNUM *b);
407 OPENSSL_EXPORT int BN_usub(BIGNUM *r, const BIGNUM *a, const BIGNUM *b);
411 OPENSSL_EXPORT int BN_sub_word(BIGNUM *a, BN_ULONG w);
415 OPENSSL_EXPORT int BN_mul(BIGNUM *r, const BIGNUM *a, const BIGNUM *b,
420 OPENSSL_EXPORT int BN_mul_word(BIGNUM *bn, BN_ULONG w);
425 OPENSSL_EXPORT int BN_sqr(BIGNUM *r, const BIGNUM *a, BN_CTX *ctx);
432 OPENSSL_EXPORT int BN_div(BIGNUM *quotient, BIGNUM *rem,
433 const BIGNUM *numerator, const BIGNUM *divisor,
438 OPENSSL_EXPORT BN_ULONG BN_div_word(BIGNUM *numerator, BN_ULONG divisor);
444 OPENSSL_EXPORT int BN_sqrt(BIGNUM *out_sqrt, const BIGNUM *in, BN_CTX *ctx);
451 OPENSSL_EXPORT int BN_cmp(const BIGNUM *a, const BIGNUM *b);
455 OPENSSL_EXPORT int BN_cmp_word(const BIGNUM *a, BN_ULONG b);
460 OPENSSL_EXPORT int BN_ucmp(const BIGNUM *a, const BIGNUM *b);
465 OPENSSL_EXPORT int BN_equal_consttime(const BIGNUM *a, const BIGNUM *b);
469 OPENSSL_EXPORT int BN_abs_is_word(const BIGNUM *bn, BN_ULONG w);
472 OPENSSL_EXPORT int BN_is_zero(const BIGNUM *bn);
475 OPENSSL_EXPORT int BN_is_one(const BIGNUM *bn);
478 OPENSSL_EXPORT int BN_is_word(const BIGNUM *bn, BN_ULONG w);
481 OPENSSL_EXPORT int BN_is_odd(const BIGNUM *bn);
484 OPENSSL_EXPORT int BN_is_pow2(const BIGNUM *a);
491 OPENSSL_EXPORT int BN_lshift(BIGNUM *r, const BIGNUM *a, int n);
495 OPENSSL_EXPORT int BN_lshift1(BIGNUM *r, const BIGNUM *a);
499 OPENSSL_EXPORT int BN_rshift(BIGNUM *r, const BIGNUM *a, int n);
503 OPENSSL_EXPORT int BN_rshift1(BIGNUM *r, const BIGNUM *a);
508 OPENSSL_EXPORT int BN_set_bit(BIGNUM *a, int n);
513 OPENSSL_EXPORT int BN_clear_bit(BIGNUM *a, int n);
517 OPENSSL_EXPORT int BN_is_bit_set(const BIGNUM *a, int n);
526 OPENSSL_EXPORT int BN_mask_bits(BIGNUM *a, int n);
531 OPENSSL_EXPORT int BN_count_low_zero_bits(const BIGNUM *bn);
537 OPENSSL_EXPORT BN_ULONG BN_mod_word(const BIGNUM *a, BN_ULONG w);
541 OPENSSL_EXPORT int BN_mod_pow2(BIGNUM *r, const BIGNUM *a, size_t e);
545 OPENSSL_EXPORT int BN_nnmod_pow2(BIGNUM *r, const BIGNUM *a, size_t e);
554 OPENSSL_EXPORT int BN_nnmod(BIGNUM *rem, const BIGNUM *numerator,
555 const BIGNUM *divisor, BN_CTX *ctx);
559 OPENSSL_EXPORT int BN_mod_add(BIGNUM *r, const BIGNUM *a, const BIGNUM *b,
560 const BIGNUM *m, BN_CTX *ctx);
564 OPENSSL_EXPORT int BN_mod_add_quick(BIGNUM *r, const BIGNUM *a, const BIGNUM *b,
565 const BIGNUM *m);
569 OPENSSL_EXPORT int BN_mod_sub(BIGNUM *r, const BIGNUM *a, const BIGNUM *b,
570 const BIGNUM *m, BN_CTX *ctx);
574 OPENSSL_EXPORT int BN_mod_sub_quick(BIGNUM *r, const BIGNUM *a, const BIGNUM *b,
575 const BIGNUM *m);
579 OPENSSL_EXPORT int BN_mod_mul(BIGNUM *r, const BIGNUM *a, const BIGNUM *b,
580 const BIGNUM *m, BN_CTX *ctx);
584 OPENSSL_EXPORT int BN_mod_sqr(BIGNUM *r, const BIGNUM *a, const BIGNUM *m,
589 OPENSSL_EXPORT int BN_mod_lshift(BIGNUM *r, const BIGNUM *a, int n,
590 const BIGNUM *m, BN_CTX *ctx);
594 OPENSSL_EXPORT int BN_mod_lshift_quick(BIGNUM *r, const BIGNUM *a, int n,
595 const BIGNUM *m);
599 OPENSSL_EXPORT int BN_mod_lshift1(BIGNUM *r, const BIGNUM *a, const BIGNUM *m,
604 OPENSSL_EXPORT int BN_mod_lshift1_quick(BIGNUM *r, const BIGNUM *a,
605 const BIGNUM *m);
616 OPENSSL_EXPORT BIGNUM *BN_mod_sqrt(BIGNUM *in, const BIGNUM *a, const BIGNUM *p,
643 OPENSSL_EXPORT int BN_rand(BIGNUM *rnd, int bits, int top, int bottom);
646 OPENSSL_EXPORT int BN_pseudo_rand(BIGNUM *rnd, int bits, int top, int bottom);
650 OPENSSL_EXPORT int BN_rand_range(BIGNUM *rnd, const BIGNUM *range);
655 OPENSSL_EXPORT int BN_rand_range_ex(BIGNUM *r, BN_ULONG min_inclusive,
656 const BIGNUM *max_exclusive);
659 OPENSSL_EXPORT int BN_pseudo_rand_range(BIGNUM *rnd, const BIGNUM *range);
720 OPENSSL_EXPORT int BN_generate_prime_ex(BIGNUM *ret, int bits, int safe,
721 const BIGNUM *add, const BIGNUM *rem,
761 enum bn_primality_result_t *out_result, const BIGNUM *w, int checks,
779 const BIGNUM *candidate, int checks,
796 OPENSSL_EXPORT int BN_is_prime_fasttest_ex(const BIGNUM *candidate, int checks,
804 OPENSSL_EXPORT int BN_is_prime_ex(const BIGNUM *candidate, int checks,
812 OPENSSL_EXPORT int BN_gcd(BIGNUM *r, const BIGNUM *a, const BIGNUM *b,
824 OPENSSL_EXPORT BIGNUM *BN_mod_inverse(BIGNUM *out, const BIGNUM *a,
825 const BIGNUM *n, BN_CTX *ctx);
837 OPENSSL_EXPORT int BN_mod_inverse_blinded(BIGNUM *out, int *out_no_inverse,
838 const BIGNUM *a,
850 int BN_mod_inverse_odd(BIGNUM *out, int *out_no_inverse, const BIGNUM *a,
851 const BIGNUM *n, BN_CTX *ctx);
861 OPENSSL_EXPORT BN_MONT_CTX *BN_MONT_CTX_new_for_modulus(const BIGNUM *mod,
866 OPENSSL_EXPORT BN_MONT_CTX *BN_MONT_CTX_new_consttime(const BIGNUM *mod,
880 OPENSSL_EXPORT int BN_to_montgomery(BIGNUM *ret, const BIGNUM *a,
887 OPENSSL_EXPORT int BN_from_montgomery(BIGNUM *ret, const BIGNUM *a,
895 OPENSSL_EXPORT int BN_mod_mul_montgomery(BIGNUM *r, const BIGNUM *a,
896 const BIGNUM *b,
905 OPENSSL_EXPORT int BN_exp(BIGNUM *r, const BIGNUM *a, const BIGNUM *p,
912 OPENSSL_EXPORT int BN_mod_exp(BIGNUM *r, const BIGNUM *a, const BIGNUM *p,
913 const BIGNUM *m, BN_CTX *ctx);
917 OPENSSL_EXPORT int BN_mod_exp_mont(BIGNUM *r, const BIGNUM *a, const BIGNUM *p,
918 const BIGNUM *m, BN_CTX *ctx,
923 OPENSSL_EXPORT int BN_mod_exp_mont_consttime(BIGNUM *rr, const BIGNUM *a,
924 const BIGNUM *p, const BIGNUM *m,
937 OPENSSL_EXPORT size_t BN_bn2mpi(const BIGNUM *in, uint8_t *out);
945 OPENSSL_EXPORT BIGNUM *BN_mpi2bn(const uint8_t *in, size_t len, BIGNUM *out);
950 OPENSSL_EXPORT int BN_mod_exp_mont_word(BIGNUM *r, BN_ULONG a, const BIGNUM *p,
951 const BIGNUM *m, BN_CTX *ctx,
956 OPENSSL_EXPORT int BN_mod_exp2_mont(BIGNUM *r, const BIGNUM *a1,
957 const BIGNUM *p1, const BIGNUM *a2,
958 const BIGNUM *p2, const BIGNUM *m,
968 OPENSSL_EXPORT int BN_MONT_CTX_set(BN_MONT_CTX *mont, const BIGNUM *mod,
975 OPENSSL_EXPORT int BN_bn2binpad(const BIGNUM *in, uint8_t *out, int len);
984 OPENSSL_EXPORT BIGNUM *BN_secure_new(void);
1019 BIGNUM RR;
1022 BIGNUM N;
1045 BORINGSSL_MAKE_DELETER(BIGNUM, BN_free) in BORINGSSL_MAKE_DELETER() argument