Lines Matching defs:carry

4864  * adding chunks to N in place, and keeping a carry for the next chunk.
4873 /* Add 64-bit chunks (dst += src) and update carry */
4874 static inline void add64(mbedtls_mpi_uint *dst, mbedtls_mpi_uint *src, mbedtls_mpi_uint *carry)
4882 *carry += c;
4885 /* Add carry to a 64-bit chunk and update carry */
4886 static inline void carry64(mbedtls_mpi_uint *dst, mbedtls_mpi_uint *carry)
4890 *dst += *carry;
4891 *carry = (*dst < *carry);
4936 /* Use the reduction for the carry as well:
4938 * It can generate a carry. */
4941 // A2 += carry
4945 /* Use the reduction for the carry as well:
4950 // A2 += carry
5095 /* Use 2^224 = P + 2^96 - 1 to modulo reduce the final carry */
5104 /* The carry reduction cannot generate a carry
5165 * to modulo reduce the final carry. */
5178 * to modulo reduce the carry generated by the previous reduction. */
5256 /* Use 2^384 = P + 2^128 + 2^96 - 2^32 + 1 to modulo reduce the final carry */
5334 mbedtls_mpi_uint carry = 0;
5350 * The high order limb of the result will be held in carry and the rest
5352 * 2^P521_WIDTH carry + X0).
5354 * Also, note that the resulting carry is either 0 or 1:
5361 carry = mbedtls_mpi_core_mla(X0, X0_limbs, X1, X1_limbs, shift);
5368 * the carry (that is 2^P521_WIDTH carry) and to reduce mod P521. */
5370 /* 2^P521_WIDTH carry = 2^(512 + biL) carry = 2^(biL - 9) carry mod P521.
5371 * Also, recall that carry is either 0 or 1. */
5372 mbedtls_mpi_uint addend = carry << (biL - 9);
5383 * that the result fit in P521_WIDTH limbs and there won't be any carry.) */
5425 mbedtls_mpi_uint *carry = mbedtls_calloc(P255_WIDTH, ciL);
5426 if (carry == NULL) {
5436 /* X = A0 + 38 * A1, capture carry out */
5437 *carry = mbedtls_mpi_core_mla(X, P255_WIDTH, A1, A1_limbs, 38);
5444 *carry <<= 1;
5445 *carry += (X[P255_WIDTH - 1] >> (biL - 1));
5446 *carry *= 19;
5453 * Furthermore for 2p = 2^256-38. When a carry propagation on the highest
5457 (void) mbedtls_mpi_core_add(X, X, carry, P255_WIDTH);
5459 mbedtls_free(carry);
5551 * added in, not returned as carry. */
5559 * Oversize Q catches potential carry here when X is already max 448 bits.
5573 /* Shifted carry bit from the addition fits in oversize M. */