Lines Matching defs:int

30 static int bn_limit_bits = 0;
31 static int bn_limit_num = 8; /* (1<<bn_limit_bits) */
32 static int bn_limit_bits_low = 0;
33 static int bn_limit_num_low = 8; /* (1<<bn_limit_bits_low) */
34 static int bn_limit_bits_high = 0;
35 static int bn_limit_num_high = 8; /* (1<<bn_limit_bits_high) */
36 static int bn_limit_bits_mont = 0;
37 static int bn_limit_num_mont = 8; /* (1<<bn_limit_bits_mont) */
39 void BN_set_params(int mult, int high, int low, int mont)
42 if (mult > (int)(sizeof(int) * 8) - 1)
43 mult = sizeof(int) * 8 - 1;
48 if (high > (int)(sizeof(int) * 8) - 1)
49 high = sizeof(int) * 8 - 1;
54 if (low > (int)(sizeof(int) * 8) - 1)
55 low = sizeof(int) * 8 - 1;
60 if (mont > (int)(sizeof(int) * 8) - 1)
61 mont = sizeof(int) * 8 - 1;
67 int BN_get_params(int which)
100 int BN_num_bits_word(BN_ULONG l)
103 int bits = (l != 0);
153 int bn_num_bits_consttime(const BIGNUM *a)
155 int j, ret;
156 unsigned int mask, past_i;
157 int i = a->top - 1;
173 mask = ~(constant_time_eq_int(i, ((int)-1)));
178 int BN_num_bits(const BIGNUM *a)
180 int i = a->top - 1;
202 static void bn_free_d(BIGNUM *a, int clear)
266 static BN_ULONG *bn_expand_internal(const BIGNUM *b, int words)
302 BIGNUM *bn_expand2(BIGNUM *b, int words)
338 int bn_words;
367 int flags_old_a, flags_old_b;
369 int tmp_top, tmp_dmax, tmp_neg;
420 int BN_set_word(BIGNUM *a, BN_ULONG w)
423 if (bn_expand(a, (int)sizeof(BN_ULONG) * 8) == NULL)
433 BIGNUM *BN_bin2bn(const unsigned char *s, int len, BIGNUM *ret)
435 unsigned int i, m;
436 unsigned int n;
455 if (bn_wexpand(ret, (int)i) == NULL) {
482 int bn2binpad(const BIGNUM *a, unsigned char *to, int tolen, endianess_t endianess)
484 int n;
532 int BN_bn2binpad(const BIGNUM *a, unsigned char *to, int tolen)
539 int BN_bn2bin(const BIGNUM *a, unsigned char *to)
544 BIGNUM *BN_lebin2bn(const unsigned char *s, int len, BIGNUM *ret)
546 unsigned int i, m;
547 unsigned int n;
567 if (bn_wexpand(ret, (int)i) == NULL) {
591 int BN_bn2lebinpad(const BIGNUM *a, unsigned char *to, int tolen)
598 BIGNUM *BN_native2bn(const unsigned char *s, int len, BIGNUM *ret)
607 int BN_bn2nativepad(const BIGNUM *a, unsigned char *to, int tolen)
616 int BN_ucmp(const BIGNUM *a, const BIGNUM *b)
618 int i;
638 int BN_cmp(const BIGNUM *a, const BIGNUM *b)
640 int i;
641 int gt, lt;
685 int BN_set_bit(BIGNUM *a, int n)
687 int i, j, k;
708 int BN_clear_bit(BIGNUM *a, int n)
710 int i, j;
726 int BN_is_bit_set(const BIGNUM *a, int n)
728 int i, j;
737 return (int)(((a->d[i]) >> j) & ((BN_ULONG)1));
740 int BN_mask_bits(BIGNUM *a, int n)
742 int b, w;
762 void BN_set_negative(BIGNUM *a, int b)
770 int bn_cmp_words(const BN_ULONG *a, const BN_ULONG *b, int n)
772 int i;
800 int bn_cmp_part_words(const BN_ULONG *a, const BN_ULONG *b, int cl, int dl)
802 int n, i;
827 void BN_consttime_swap(BN_ULONG condition, BIGNUM *a, BIGNUM *b, int nwords)
830 int i;
888 int BN_security_bits(int L, int N)
890 int secbits, bits;
918 int BN_abs_is_word(const BIGNUM *a, const BN_ULONG w)
923 int BN_is_zero(const BIGNUM *a)
928 int BN_is_one(const BIGNUM *a)
933 int BN_is_word(const BIGNUM *a, const BN_ULONG w)
938 int BN_is_odd(const BIGNUM *a)
943 int BN_is_negative(const BIGNUM *a)
948 int BN_to_montgomery(BIGNUM *r, const BIGNUM *a, BN_MONT_CTX *mont,
954 void BN_with_flags(BIGNUM *dest, const BIGNUM *b, int flags)
984 void BN_set_flags(BIGNUM *b, int n)
989 int BN_get_flags(const BIGNUM *b, int n)
995 void BN_GENCB_set_old(BN_GENCB *gencb, void (*callback) (int, int, void *),
1005 void BN_GENCB_set(BN_GENCB *gencb, int (*callback) (int, int, BN_GENCB *),
1019 BIGNUM *bn_wexpand(BIGNUM *a, int words)
1026 int j, atop;
1028 unsigned int mask;
1035 mask = (unsigned int)limb;
1049 int tmp_top = a->top;