Home
last modified time | relevance | path

Searched refs:biL (Results 1 – 7 of 7) sorted by relevance

/third_party/mbedtls/library/
Dbignum_core.c39 mbedtls_mpi_uint mask = (mbedtls_mpi_uint) 1 << (biL - 1); in mbedtls_mpi_core_clz()
41 for (j = 0; j < biL; j++) { in mbedtls_mpi_core_clz()
66 j = biL - mbedtls_mpi_core_clz(A[i]); in mbedtls_mpi_core_bitlen()
68 return (i * biL) + j; in mbedtls_mpi_core_bitlen()
322 v0 = count / biL; in mbedtls_mpi_core_shift_r()
323 v1 = count & (biL - 1); in mbedtls_mpi_core_shift_r()
348 r1 = X[i - 1] << (biL - v1); in mbedtls_mpi_core_shift_r()
460 for (unsigned int i = biL; i >= 8; i /= 2) { in mbedtls_mpi_core_montmul_init()
525 MBEDTLS_MPI_CHK(mbedtls_mpi_shift_l(X, N->n * 2 * biL)); in mbedtls_mpi_core_get_mont_r2_unsafe()
650 const size_t wsize = exp_mod_get_window_size(E_limbs * biL); in mbedtls_mpi_core_exp_mod_working_limbs()
[all …]
Dbignum.c291 if (X->n * biL <= pos) { in mbedtls_mpi_get_bit()
295 return (X->p[pos / biL] >> (pos % biL)) & 0x01; in mbedtls_mpi_get_bit()
304 size_t off = pos / biL; in mbedtls_mpi_set_bit()
305 size_t idx = pos % biL; in mbedtls_mpi_set_bit()
312 if (X->n * biL <= pos) { in mbedtls_mpi_set_bit()
337 for (j = 0; j < biL; j++, count++) { in mbedtls_mpi_lsb()
757 v0 = count / (biL); in mbedtls_mpi_shift_l()
758 t1 = count & (biL - 1); in mbedtls_mpi_shift_l()
762 if (X->n * biL < i) { in mbedtls_mpi_shift_l()
786 r1 = X->p[i] >> (biL - t1); in mbedtls_mpi_shift_l()
[all …]
Dbignum_core.h90 #define biL (ciL << 3) /** bits in limb */ macro
97 #define BITS_TO_LIMBS(i) ((i) / biL + ((i) % biL != 0))
Decp_curves.c4908 size_t expected_width = 2 * ((192 + biL - 1) / biL); in ecp_mod_p192()
4922 if (Nn != 2*((192 + biL - 1)/biL)) { in mbedtls_ecp_mod_p192_raw()
5058 size_t expected_width = 2 * 224 / biL; in ecp_mod_p224()
5068 if (X_limbs != 2 * 224 / biL) { in mbedtls_ecp_mod_p224_raw()
5111 size_t expected_width = 2 * 256 / biL; in ecp_mod_p256()
5121 if (X_limbs != 2 * 256 / biL) { in mbedtls_ecp_mod_p256_raw()
5273 MBEDTLS_MPI_CHK(mbedtls_mpi_grow(N, (b) * 2 / biL + 1)); \
5434 mbedtls_mpi_uint shift = ((mbedtls_mpi_uint) 1u) << (biL - 9); in mbedtls_ecp_mod_p521_raw()
5446 mbedtls_mpi_uint addend = carry << (biL - 9); in mbedtls_ecp_mod_p521_raw()
Dbn_mul.h1016 r1 = (mbedtls_mpi_uint)( r >> biL ); \
/third_party/mbedtls/tests/suites/
Dtest_suite_bignum.function1249 /* Ad hoc tests for n = -p = -2^(biL-1) as a mbedtls_mpi_sint. We
1259 * - biL = number of bits in limbs
1260 * - p = 2^(biL-1) (smallest positive value not in mbedtls_mpi_sint range)
1261 * - n = -2^(biL-1) (largest negative value in mbedtls_mpi_sint range)
1269 mbedtls_mpi_uint most_positive_plus_1 = (mbedtls_mpi_uint) 1 << (biL - 1);
1273 (mbedtls_mpi_uint) 1 << (biL - 1));
Dtest_suite_ecp.function1369 TEST_EQUAL(limbs_X, 448 / biL);