Home
last modified time | relevance | path

Searched refs:borrow (Results 1 – 3 of 3) sorted by relevance

/mbedtls-latest/library/
Dbignum_mod_raw.c184 mbedtls_mpi_uint carry, borrow; in mbedtls_mpi_mod_raw_add() local
186 borrow = mbedtls_mpi_core_sub(X, X, N->p, N->limbs); in mbedtls_mpi_mod_raw_add()
187 (void) mbedtls_mpi_core_add_if(X, N->p, N->limbs, (unsigned) (carry ^ borrow)); in mbedtls_mpi_mod_raw_add()
272 mbedtls_mpi_uint borrow = mbedtls_mpi_core_sub(X, X, N->p, N->limbs); in mbedtls_mpi_mod_raw_neg() local
273 (void) mbedtls_mpi_core_add_if(X, N->p, N->limbs, (unsigned) borrow); in mbedtls_mpi_mod_raw_neg()
Dbignum_core.c559 mbedtls_mpi_uint borrow = mbedtls_mpi_core_sub(X, T, N, AN_limbs); in mbedtls_mpi_core_montmul() local
575 mbedtls_ct_memcpy_if(mbedtls_ct_bool(carry ^ borrow), in mbedtls_mpi_core_montmul()
/mbedtls-latest/tests/suites/
Dtest_suite_bignum_core.function1295 char *input_X, int borrow)
1298 * result X with borrow borrow. However, for ease of handling we encode b
1324 /* 1. R = A - b. Result and borrow should be correct */
1325 TEST_EQUAL(mbedtls_mpi_core_sub_int(R, A, B[0], limbs), borrow);
1328 /* 2. A = A - b. Result and borrow should be correct */
1329 TEST_EQUAL(mbedtls_mpi_core_sub_int(A, A, B[0], limbs), borrow);