Lines Matching refs:top

158     int i = a->top - 1;  in bn_num_bits_consttime()
181 int i = a->top - 1; in BN_num_bits()
284 assert(b->top <= words); in bn_expand_internal()
285 if (b->top > 0) in bn_expand_internal()
286 memcpy(a, b->d, sizeof(*a) * b->top); in bn_expand_internal()
339 bn_words = BN_get_flags(b, BN_FLG_CONSTTIME) ? b->dmax : b->top; in BN_copy()
346 if (b->top > 0) in BN_copy()
350 a->top = b->top; in BN_copy()
375 tmp_top = a->top; in BN_swap()
380 a->top = b->top; in BN_swap()
385 b->top = tmp_top; in BN_swap()
403 a->top = 0; in BN_clear()
409 if (a->top > 1) in BN_get_word()
411 else if (a->top == 1) in BN_get_word()
424 a->top = (w ? 1 : 0); in BN_set_word()
504 ret->top = 0; in bin2bn()
512 ret->top = n; in bin2bn()
611 atop = a->top * BN_BYTES; in bn2binpad()
716 && a->top == b->top) { in BN_ucmp()
719 for (i = 0; i < b->top; i++) { in BN_ucmp()
731 i = a->top - b->top; in BN_ucmp()
735 for (i = a->top - 1; i >= 0; i--) { in BN_ucmp()
776 if (a->top > b->top) in BN_cmp()
778 if (a->top < b->top) in BN_cmp()
780 for (i = a->top - 1; i >= 0; i--) { in BN_cmp()
800 if (a->top <= i) { in BN_set_bit()
803 for (k = a->top; k < i + 1; k++) in BN_set_bit()
805 a->top = i + 1; in BN_set_bit()
824 if (a->top <= i) in BN_clear_bit()
841 if (a->top <= i) in BN_is_bit_set()
855 if (w >= a->top) in ossl_bn_mask_bits_fixed_top()
858 a->top = w; in ossl_bn_mask_bits_fixed_top()
860 a->top = w + 1; in ossl_bn_mask_bits_fixed_top()
953 t = (a->top ^ b->top) & condition; in BN_consttime_swap()
954 a->top ^= t; in BN_consttime_swap()
955 b->top ^= t; in BN_consttime_swap()
1027 a->top = 0; in BN_zero_ex()
1033 return ((a->top == 1) && (a->d[0] == w)) || ((w == 0) && (a->top == 0)); in BN_abs_is_word()
1038 return a->top == 0; in BN_is_zero()
1056 if (a->neg || a->top == 0) in ossl_bn_is_word_fixed_top()
1061 for (i = 1; i < a->top; i++) in ossl_bn_is_word_fixed_top()
1069 return (a->top > 0) && (a->d[0] & 1); in BN_is_odd()
1086 dest->top = b->top; in BN_with_flags()
1163 mask &= constant_time_msb(j - a->top); in bn_correct_top_consttime()
1168 a->top = atop; in bn_correct_top_consttime()
1176 int tmp_top = a->top; in bn_correct_top()
1184 a->top = tmp_top; in bn_correct_top()
1186 if (a->top == 0) in bn_correct_top()