Lines Matching defs:bits
4826 * For this prime we need to handle data in chunks of 64 bits.
4895 * (1) chunks of 32 bits, and (2) subtractions.
4899 * For these primes, we need to handle data in chunks of 32 bits.
4900 * This makes it more complicated if we use 64 bits limbs in MPI,
4957 size_t i = 0, bits = (b); \
4975 if (c < 0) mbedtls_ecp_fix_negative(N, c, bits);
4979 * c * 2^bits + N, with c negative and N positive shorter than 'bits'
4981 static void mbedtls_ecp_fix_negative(mbedtls_mpi *N, signed char c, size_t bits)
4985 /* Set N := 2^bits - 1 - N. We know that 0 <= N < 2^bits, so
4987 * since we're subtracting from all-bits-one. */
4988 for (i = 0; i <= bits / 8 / sizeof(mbedtls_mpi_uint); i++) {
4995 } while (N->p[i++] == 0 && i <= bits / 8 / sizeof(mbedtls_mpi_uint));
4997 * Now N = N0 - 2^bits where N0 is the initial value of N. */
5000 /* Add |c| * 2^bits to the absolute value. Since c and N are
5001 * negative, this adds c * 2^bits. */
5004 if (bits == 224) {
5008 N->p[bits / 8 / sizeof(mbedtls_mpi_uint)] += msw;
5133 * However, chunks are aligned on a 'weird' boundary (521 bits).
5152 /* Worst case for the size of M is when mbedtls_mpi_uint is 16 bits:
5153 * we need to hold bits 513 to 1056, which is 34 limbs, that is
5307 * with R about 33 bits, used by the Koblitz curves.