Lines Matching refs:top

157     int i = a->top - 1;  in bn_num_bits_consttime()
180 int i = a->top - 1; in BN_num_bits()
287 assert(b->top <= words); in bn_expand_internal()
288 if (b->top > 0) in bn_expand_internal()
289 memcpy(a, b->d, sizeof(*a) * b->top); in bn_expand_internal()
342 bn_words = BN_get_flags(b, BN_FLG_CONSTTIME) ? b->dmax : b->top; in BN_copy()
349 if (b->top > 0) in BN_copy()
353 a->top = b->top; in BN_copy()
378 tmp_top = a->top; in BN_swap()
383 a->top = b->top; in BN_swap()
388 b->top = tmp_top; in BN_swap()
406 a->top = 0; in BN_clear()
412 if (a->top > 1) in BN_get_word()
414 else if (a->top == 1) in BN_get_word()
427 a->top = (w ? 1 : 0); in BN_set_word()
450 ret->top = 0; in BN_bin2bn()
459 ret->top = i; in BN_bin2bn()
514 atop = a->top * BN_BYTES; in bn2binpad()
562 ret->top = 0; in BN_lebin2bn()
571 ret->top = i; in BN_lebin2bn()
624 i = a->top - b->top; in BN_ucmp()
629 for (i = a->top - 1; i >= 0; i--) { in BN_ucmp()
670 if (a->top > b->top) in BN_cmp()
672 if (a->top < b->top) in BN_cmp()
674 for (i = a->top - 1; i >= 0; i--) { in BN_cmp()
694 if (a->top <= i) { in BN_set_bit()
697 for (k = a->top; k < i + 1; k++) in BN_set_bit()
699 a->top = i + 1; in BN_set_bit()
718 if (a->top <= i) in BN_clear_bit()
735 if (a->top <= i) in BN_is_bit_set()
750 if (w >= a->top) in BN_mask_bits()
753 a->top = w; in BN_mask_bits()
755 a->top = w + 1; in BN_mask_bits()
840 t = (a->top ^ b->top) & condition; in BN_consttime_swap()
841 a->top ^= t; in BN_consttime_swap()
842 b->top ^= t; in BN_consttime_swap()
914 a->top = 0; in BN_zero_ex()
920 return ((a->top == 1) && (a->d[0] == w)) || ((w == 0) && (a->top == 0)); in BN_abs_is_word()
925 return a->top == 0; in BN_is_zero()
940 return (a->top > 0) && (a->d[0] & 1); in BN_is_odd()
957 dest->top = b->top; in BN_with_flags()
1036 mask &= constant_time_msb(j - a->top); in bn_correct_top_consttime()
1041 a->top = atop; in bn_correct_top_consttime()
1049 int tmp_top = a->top; in bn_correct_top()
1057 a->top = tmp_top; in bn_correct_top()
1059 if (a->top == 0) in bn_correct_top()