Home
last modified time | relevance | path

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

/mbedtls-latest/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()
60 j = biL - mbedtls_mpi_core_clz(A[i]); in mbedtls_mpi_core_bitlen()
61 return (i * biL) + j; in mbedtls_mpi_core_bitlen()
336 v0 = count / biL; in mbedtls_mpi_core_shift_r()
337 v1 = count & (biL - 1); in mbedtls_mpi_core_shift_r()
362 r1 = X[i - 1] << (biL - v1); in mbedtls_mpi_core_shift_r()
376 v0 = count / (biL); in mbedtls_mpi_core_shift_l()
377 v1 = count & (biL - 1); in mbedtls_mpi_core_shift_l()
397 r1 = X[i] >> (biL - v1); in mbedtls_mpi_core_shift_l()
[all …]
Dbignum.c372 #define TO_SIGN(x) ((mbedtls_mpi_sint) (((mbedtls_mpi_uint) x) >> (biL - 1)) * -2 + 1)
397 if (X->n * biL <= pos) { in mbedtls_mpi_get_bit()
401 return (X->p[pos / biL] >> (pos % biL)) & 0x01; in mbedtls_mpi_get_bit()
410 size_t off = pos / biL; in mbedtls_mpi_set_bit()
411 size_t idx = pos % biL; in mbedtls_mpi_set_bit()
417 if (X->n * biL <= pos) { in mbedtls_mpi_set_bit()
453 return i * biL + mbedtls_mpi_uint_ctz(X->p[i]); in mbedtls_mpi_lsb()
459 for (size_t j = 0; j < biL; j++, count++) { in mbedtls_mpi_lsb()
868 if (X->n * biL < i) { in mbedtls_mpi_shift_l()
1317 dividend = (mbedtls_t_udbl) u1 << biL; in mbedtls_int_div_int()
[all …]
Dbignum_core.h80 #define biL (ciL << 3) /** bits in limb */ macro
87 #define BITS_TO_LIMBS(i) ((i) / biL + ((i) % biL != 0))
Decp_curves_new.c5360 mbedtls_mpi_uint shift = ((mbedtls_mpi_uint) 1u) << (biL - 9); in mbedtls_ecp_mod_p521_raw()
5372 mbedtls_mpi_uint addend = carry << (biL - 9); in mbedtls_ecp_mod_p521_raw()
5445 *carry += (X[P255_WIDTH - 1] >> (biL - 1)); in mbedtls_ecp_mod_p255_raw()
5602 M[P224_WIDTH_MIN] = M[0] << (224 & (biL - 1)); in mbedtls_ecp_mod_p448_raw()
5641 size_t shift = bits % biL; in ecp_mod_koblitz()
5642 size_t adjust = (shift + biL - 1) / biL; in ecp_mod_koblitz()
5643 size_t P_limbs = bits / biL + adjust; in ecp_mod_koblitz()
Dbn_mul.h1038 r1 = (mbedtls_mpi_uint)( r >> biL ); \
Decp_curves.c4960 MBEDTLS_MPI_CHK(mbedtls_mpi_grow(N, (b) * 2 / biL + 1)); \
/mbedtls-latest/tests/suites/
Dtest_suite_bignum.function1278 /* Ad hoc tests for n = -p = -2^(biL-1) as a mbedtls_mpi_sint. We
1288 * - biL = number of bits in limbs
1289 * - p = 2^(biL-1) (smallest positive value not in mbedtls_mpi_sint range)
1290 * - n = -2^(biL-1) (largest negative value in mbedtls_mpi_sint range)
1298 mbedtls_mpi_uint most_positive_plus_1 = (mbedtls_mpi_uint) 1 << (biL - 1);
1302 (mbedtls_mpi_uint) 1 << (biL - 1));