Lines Matching refs:i

89 UINT i;  in _nx_crypto_huge_number_is_zero()  local
91 for (i = 0; i < x -> nx_crypto_huge_number_size; i++) in _nx_crypto_huge_number_is_zero()
93 if (x -> nx_crypto_huge_number_data[i]) in _nx_crypto_huge_number_is_zero()
352 UINT i; in _nx_crypto_huge_number_add_unsigned() local
379 for (i = 0; i < right_size; i++) in _nx_crypto_huge_number_add_unsigned()
381 product = (product >> HN_SHIFT) + left_buffer[i] + right_buffer[i]; in _nx_crypto_huge_number_add_unsigned()
382 result_buffer[i] = product & HN_MASK; in _nx_crypto_huge_number_add_unsigned()
386 for (; i < left_size; i++) in _nx_crypto_huge_number_add_unsigned()
388 product = (product >> HN_SHIFT) + left_buffer[i]; in _nx_crypto_huge_number_add_unsigned()
389 result_buffer[i] = product & HN_MASK; in _nx_crypto_huge_number_add_unsigned()
394 ((i << HN_SIZE_SHIFT) < left -> nx_crypto_huge_buffer_size)) in _nx_crypto_huge_number_add_unsigned()
398 result_buffer[i] = 1; in _nx_crypto_huge_number_add_unsigned()
399 left -> nx_crypto_huge_number_size = i + 1; in _nx_crypto_huge_number_add_unsigned()
403 left -> nx_crypto_huge_number_size = i; in _nx_crypto_huge_number_add_unsigned()
459 UINT i; in _nx_crypto_huge_number_subtract_unsigned() local
470 for (i = 0; i < right -> nx_crypto_huge_number_size; i++) in _nx_crypto_huge_number_subtract_unsigned()
473 product += (HN_UBASE2)((HN_RADIX - 1) + left_buffer[i] - right_buffer[i]); in _nx_crypto_huge_number_subtract_unsigned()
474 result_buffer[i] = (product & HN_MASK); in _nx_crypto_huge_number_subtract_unsigned()
478 for (; i < left -> nx_crypto_huge_number_size; i++) in _nx_crypto_huge_number_subtract_unsigned()
481 product += (HN_UBASE2)((HN_RADIX - 1) + left_buffer[i]); in _nx_crypto_huge_number_subtract_unsigned()
482 result_buffer[i] = (product & HN_MASK); in _nx_crypto_huge_number_subtract_unsigned()
535 UINT i; in _nx_crypto_huge_number_add_digit_unsigned() local
544 for (i = 1; (i < size) && ((product >> HN_SHIFT) != 0); i++) in _nx_crypto_huge_number_add_digit_unsigned()
546 product = (HN_UBASE)buffer[i] + 1; in _nx_crypto_huge_number_add_digit_unsigned()
547 buffer[i] = product & HN_MASK; in _nx_crypto_huge_number_add_digit_unsigned()
551 if ((product >> HN_SHIFT) && (i == size)) in _nx_crypto_huge_number_add_digit_unsigned()
553 buffer[i] = 1; in _nx_crypto_huge_number_add_digit_unsigned()
554 value -> nx_crypto_huge_number_size = i + 1; in _nx_crypto_huge_number_add_digit_unsigned()
610 UINT i; in _nx_crypto_huge_number_subtract_digit_unsigned() local
619 for (i = 1; (i < size) && ((product >> HN_SHIFT) == 0); i++) in _nx_crypto_huge_number_subtract_digit_unsigned()
621 product = (HN_UBASE2)(HN_RADIX + (HN_UBASE)buffer[i] - 1); in _nx_crypto_huge_number_subtract_digit_unsigned()
622 buffer[i] = product & HN_MASK; in _nx_crypto_huge_number_subtract_digit_unsigned()
673 UINT i; in _nx_crypto_huge_number_shift_left() local
677 i = x -> nx_crypto_huge_number_size; in _nx_crypto_huge_number_shift_left()
678 x_buffer[i] = x_buffer[i - 1] >> (HN_SHIFT - shift); in _nx_crypto_huge_number_shift_left()
679 for (i--; i > 0; i--) in _nx_crypto_huge_number_shift_left()
681 x_buffer[i] = (x_buffer[i - 1] >> (HN_SHIFT - shift)) | (x_buffer[i] << shift); in _nx_crypto_huge_number_shift_left()
743 UINT i; in _nx_crypto_huge_number_shift_right() local
747 for (i = 0; i < x -> nx_crypto_huge_number_size - 1; i++) in _nx_crypto_huge_number_shift_right()
749 x_buffer[i] = (x_buffer[i + 1] << (HN_SHIFT - shift)) | (x_buffer[i] >> shift); in _nx_crypto_huge_number_shift_right()
751 x_buffer[i] >>= shift; in _nx_crypto_huge_number_shift_right()
991 INT i; in _nx_crypto_huge_number_compare_unsigned() local
1018 for (i = (INT)left_size - 1; i >= 0; i--) in _nx_crypto_huge_number_compare_unsigned()
1020 if (left -> nx_crypto_huge_number_data[i] > right -> nx_crypto_huge_number_data[i]) in _nx_crypto_huge_number_compare_unsigned()
1024 else if (right -> nx_crypto_huge_number_data[i] > left -> nx_crypto_huge_number_data[i]) in _nx_crypto_huge_number_compare_unsigned()
1202 UINT i; in _nx_crypto_huge_number_multiply_digit() local
1222 for (i = 0; i < size; i++) in _nx_crypto_huge_number_multiply_digit()
1225 product += (HN_UBASE2)value_buffer[i] * digit; in _nx_crypto_huge_number_multiply_digit()
1226 result_buffer[i] = (product & HN_MASK); in _nx_crypto_huge_number_multiply_digit()
1231 result_buffer[i] = (HN_UBASE)(product >> HN_SHIFT); in _nx_crypto_huge_number_multiply_digit()
1296 UINT i, j; in _nx_crypto_huge_number_square() local
1307 for (i = 0; i < value_size; i++) in _nx_crypto_huge_number_square()
1310 for (j = i + 1; j < value_size; j++) in _nx_crypto_huge_number_square()
1313 product += result_buffer[i + j] + (HN_UBASE2)value_buffer[i] * value_buffer[j]; in _nx_crypto_huge_number_square()
1314 result_buffer[i + j] = product & HN_MASK; in _nx_crypto_huge_number_square()
1316 result_buffer[i + j] = (HN_UBASE)(product >> HN_SHIFT); in _nx_crypto_huge_number_square()
1319 for (i = result_size - 1; i > 0; i--) in _nx_crypto_huge_number_square()
1321 result_buffer[i] = (result_buffer[i] << 1) | (result_buffer[i - 1] >> (HN_SHIFT - 1)); in _nx_crypto_huge_number_square()
1326 for (i = 0; i < value_size; i++) in _nx_crypto_huge_number_square()
1329 product += result_buffer[i << 1] + (HN_UBASE2)value_buffer[i] * value_buffer[i]; in _nx_crypto_huge_number_square()
1330 result_buffer[i << 1] = product & HN_MASK; in _nx_crypto_huge_number_square()
1332 product += result_buffer[(i << 1) + 1]; in _nx_crypto_huge_number_square()
1333 result_buffer[(i << 1) + 1] = product & HN_MASK; in _nx_crypto_huge_number_square()
1424 UINT i; in _nx_crypto_huge_number_modulus() local
1536 i = 0; in _nx_crypto_huge_number_modulus()
1540 product = divisor_buffer[i] * scale; in _nx_crypto_huge_number_modulus()
1552 i++; in _nx_crypto_huge_number_modulus()
1555 if (i <= divisor_length) in _nx_crypto_huge_number_modulus()
1557 product = divisor_buffer[i] * scale + carry; in _nx_crypto_huge_number_modulus()
1664 UINT i = 0; in _nx_crypto_huge_number_setup() local
1706 i++; in _nx_crypto_huge_number_setup()
1711 i++; in _nx_crypto_huge_number_setup()
1716 i += 2; in _nx_crypto_huge_number_setup()
1721 i += 3; in _nx_crypto_huge_number_setup()
1728 for (; i < size; i += sizeof(HN_UBASE)) in _nx_crypto_huge_number_setup()
1731 word = (HN_UBASE)((byte_stream[i] << 8) | (byte_stream[i + 1])); in _nx_crypto_huge_number_setup()
1733 word = (HN_UBASE)((byte_stream[i] << 24) | in _nx_crypto_huge_number_setup()
1734 (byte_stream[i + 1] << 16) | in _nx_crypto_huge_number_setup()
1735 (byte_stream[i + 2] << 8) | in _nx_crypto_huge_number_setup()
1736 (byte_stream[i + 3])); in _nx_crypto_huge_number_setup()
1920 INT i = 0; in _nx_crypto_huge_number_extract() local
1935 for (i = (INT)(number -> nx_crypto_huge_number_size - 1); i >= 0; i--) in _nx_crypto_huge_number_extract()
1937 value = word[i]; in _nx_crypto_huge_number_extract()
1998 INT i = 0; in _nx_crypto_huge_number_extract_fixed_size() local
2077 for (i = (INT)(num_size_adjusted - 2); i >= 0; i--) in _nx_crypto_huge_number_extract_fixed_size()
2079 value = word[i]; in _nx_crypto_huge_number_extract_fixed_size()
2461 UINT i, j; in _nx_crypto_huge_number_mont() local
2475 for (i = 0; i < x_len; i++) in _nx_crypto_huge_number_mont()
2478 xi = x_buffer[i]; in _nx_crypto_huge_number_mont()
2511 for (; i < m_len; i++) in _nx_crypto_huge_number_mont()