Lines Matching refs:a

360 int BN_GENCB_call(BN_GENCB *cb, int a, int b);
398 # define BN_num_bytes(a) ((BN_num_bits(a)+7)/8) argument
401 # define BN_abs_is_word(a,w) ((((a)->top == 1) && ((a)->d[0] == (BN_ULONG)(w))) || \ argument
402 (((w) == 0) && ((a)->top == 0)))
403 # define BN_is_zero(a) ((a)->top == 0) argument
404 # define BN_is_one(a) (BN_abs_is_word((a),1) && !(a)->neg) argument
405 # define BN_is_word(a,w) (BN_abs_is_word((a),(w)) && (!(w) || !(a)->neg)) argument
406 # define BN_is_odd(a) (((a)->top > 0) && ((a)->d[0] & 1)) argument
408 # define BN_one(a) (BN_set_word((a),1)) argument
409 # define BN_zero_ex(a) \ argument
411 BIGNUM *_tmp_bn = (a); \
416 # define BN_zero(a) BN_zero_ex(a) argument
418 # define BN_zero(a) (BN_set_word((a),0)) argument
435 int BN_num_bits(const BIGNUM *a);
439 void BN_clear_free(BIGNUM *a);
440 BIGNUM *BN_copy(BIGNUM *a, const BIGNUM *b);
441 void BN_swap(BIGNUM *a, BIGNUM *b);
443 int BN_bn2bin(const BIGNUM *a, unsigned char *to);
445 int BN_bn2mpi(const BIGNUM *a, unsigned char *to);
446 int BN_sub(BIGNUM *r, const BIGNUM *a, const BIGNUM *b);
447 int BN_usub(BIGNUM *r, const BIGNUM *a, const BIGNUM *b);
448 int BN_uadd(BIGNUM *r, const BIGNUM *a, const BIGNUM *b);
449 int BN_add(BIGNUM *r, const BIGNUM *a, const BIGNUM *b);
450 int BN_mul(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, BN_CTX *ctx);
451 int BN_sqr(BIGNUM *r, const BIGNUM *a, BN_CTX *ctx);
461 # define BN_is_negative(a) ((a)->neg != 0) argument
467 int BN_mod_add(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, const BIGNUM *m,
469 int BN_mod_add_quick(BIGNUM *r, const BIGNUM *a, const BIGNUM *b,
471 int BN_mod_sub(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, const BIGNUM *m,
473 int BN_mod_sub_quick(BIGNUM *r, const BIGNUM *a, const BIGNUM *b,
475 int BN_mod_mul(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, const BIGNUM *m,
477 int BN_mod_sqr(BIGNUM *r, const BIGNUM *a, const BIGNUM *m, BN_CTX *ctx);
478 int BN_mod_lshift1(BIGNUM *r, const BIGNUM *a, const BIGNUM *m, BN_CTX *ctx);
479 int BN_mod_lshift1_quick(BIGNUM *r, const BIGNUM *a, const BIGNUM *m);
480 int BN_mod_lshift(BIGNUM *r, const BIGNUM *a, int n, const BIGNUM *m,
482 int BN_mod_lshift_quick(BIGNUM *r, const BIGNUM *a, int n, const BIGNUM *m);
484 BN_ULONG BN_mod_word(const BIGNUM *a, BN_ULONG w);
485 BN_ULONG BN_div_word(BIGNUM *a, BN_ULONG w);
486 int BN_mul_word(BIGNUM *a, BN_ULONG w);
487 int BN_add_word(BIGNUM *a, BN_ULONG w);
488 int BN_sub_word(BIGNUM *a, BN_ULONG w);
489 int BN_set_word(BIGNUM *a, BN_ULONG w);
490 BN_ULONG BN_get_word(const BIGNUM *a);
492 int BN_cmp(const BIGNUM *a, const BIGNUM *b);
493 void BN_free(BIGNUM *a);
494 int BN_is_bit_set(const BIGNUM *a, int n);
495 int BN_lshift(BIGNUM *r, const BIGNUM *a, int n);
496 int BN_lshift1(BIGNUM *r, const BIGNUM *a);
497 int BN_exp(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx);
499 int BN_mod_exp(BIGNUM *r, const BIGNUM *a, const BIGNUM *p,
501 int BN_mod_exp_mont(BIGNUM *r, const BIGNUM *a, const BIGNUM *p,
503 int BN_mod_exp_mont_consttime(BIGNUM *rr, const BIGNUM *a, const BIGNUM *p,
506 int BN_mod_exp_mont_word(BIGNUM *r, BN_ULONG a, const BIGNUM *p,
511 int BN_mod_exp_simple(BIGNUM *r, const BIGNUM *a, const BIGNUM *p,
514 int BN_mask_bits(BIGNUM *a, int n);
516 int BN_print_fp(FILE *fp, const BIGNUM *a);
519 int BN_print(BIO *fp, const BIGNUM *a);
521 int BN_print(void *fp, const BIGNUM *a);
524 int BN_rshift(BIGNUM *r, const BIGNUM *a, int n);
525 int BN_rshift1(BIGNUM *r, const BIGNUM *a);
526 void BN_clear(BIGNUM *a);
527 BIGNUM *BN_dup(const BIGNUM *a);
528 int BN_ucmp(const BIGNUM *a, const BIGNUM *b);
529 int BN_set_bit(BIGNUM *a, int n);
530 int BN_clear_bit(BIGNUM *a, int n);
531 char *BN_bn2hex(const BIGNUM *a);
532 char *BN_bn2dec(const BIGNUM *a);
533 int BN_hex2bn(BIGNUM **a, const char *str);
534 int BN_dec2bn(BIGNUM **a, const char *str);
535 int BN_asc2bn(BIGNUM **a, const char *str);
536 int BN_gcd(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, BN_CTX *ctx);
537 int BN_kronecker(const BIGNUM *a, const BIGNUM *b, BN_CTX *ctx); /* returns
541 const BIGNUM *a, const BIGNUM *n, BN_CTX *ctx);
543 const BIGNUM *a, const BIGNUM *n, BN_CTX *ctx);
545 void BN_consttime_swap(BN_ULONG swap, BIGNUM *a, BIGNUM *b, int nwords);
579 int BN_mod_mul_montgomery(BIGNUM *r, const BIGNUM *a, const BIGNUM *b,
581 # define BN_to_montgomery(r,a,mont,ctx) BN_mod_mul_montgomery(\ argument
582 (r),(a),&((mont)->RR),(mont),(ctx))
583 int BN_from_montgomery(BIGNUM *r, const BIGNUM *a,
613 const BIGNUM *a,
631 int BN_mod_exp_recp(BIGNUM *r, const BIGNUM *a, const BIGNUM *p,
648 int BN_GF2m_add(BIGNUM *r, const BIGNUM *a, const BIGNUM *b);
649 # define BN_GF2m_sub(r, a, b) BN_GF2m_add(r, a, b) argument
653 int BN_GF2m_mod(BIGNUM *r, const BIGNUM *a, const BIGNUM *p);
655 int BN_GF2m_mod_mul(BIGNUM *r, const BIGNUM *a, const BIGNUM *b,
658 int BN_GF2m_mod_sqr(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx);
662 int BN_GF2m_mod_div(BIGNUM *r, const BIGNUM *a, const BIGNUM *b,
665 int BN_GF2m_mod_exp(BIGNUM *r, const BIGNUM *a, const BIGNUM *b,
668 int BN_GF2m_mod_sqrt(BIGNUM *r, const BIGNUM *a, const BIGNUM *p,
671 int BN_GF2m_mod_solve_quad(BIGNUM *r, const BIGNUM *a, const BIGNUM *p,
673 # define BN_GF2m_cmp(a, b) BN_ucmp((a), (b)) argument
681 int BN_GF2m_mod_arr(BIGNUM *r, const BIGNUM *a, const int p[]);
683 int BN_GF2m_mod_mul_arr(BIGNUM *r, const BIGNUM *a, const BIGNUM *b,
686 int BN_GF2m_mod_sqr_arr(BIGNUM *r, const BIGNUM *a, const int p[],
692 int BN_GF2m_mod_div_arr(BIGNUM *r, const BIGNUM *a, const BIGNUM *b,
695 int BN_GF2m_mod_exp_arr(BIGNUM *r, const BIGNUM *a, const BIGNUM *b,
698 int BN_GF2m_mod_sqrt_arr(BIGNUM *r, const BIGNUM *a,
701 int BN_GF2m_mod_solve_quad_arr(BIGNUM *r, const BIGNUM *a,
703 int BN_GF2m_poly2arr(const BIGNUM *a, int p[], int max);
704 int BN_GF2m_arr2poly(const int p[], BIGNUM *a);
711 int BN_nist_mod_192(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx);
712 int BN_nist_mod_224(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx);
713 int BN_nist_mod_256(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx);
714 int BN_nist_mod_384(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx);
715 int BN_nist_mod_521(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx);
725 # define bn_expand(a,bits) \ argument
730 (((bits+BN_BITS2-1)/BN_BITS2) <= (a)->dmax) ? \
731 (a) \
733 bn_expand2((a),(bits+BN_BITS2-1)/BN_BITS2) \
736 # define bn_wexpand(a,words) (((words) <= (a)->dmax)?(a):bn_expand2((a),(words))) argument
737 BIGNUM *bn_expand2(BIGNUM *a, int words);
739 BIGNUM *bn_dup_expand(const BIGNUM *a, int words); /* unused */
782 # define bn_pollute(a) \ argument
784 const BIGNUM *_bnum1 = (a); \
802 # define bn_pollute(a) argument
804 # define bn_check_top(a) \ argument
806 const BIGNUM *_bnum2 = (a); \
814 # define bn_fix_top(a) bn_check_top(a) argument
827 # define bn_pollute(a) argument
828 # define bn_check_top(a) argument
829 # define bn_fix_top(a) bn_correct_top(a) argument
835 # define bn_correct_top(a) \ argument
838 int tmp_top = (a)->top; \
841 for (ftl= &((a)->d[tmp_top-1]); tmp_top > 0; tmp_top--) \
843 (a)->top = tmp_top; \
845 bn_pollute(a); \