Lines Matching refs:b
9 #define TEST_COMPARE_MPI_RESIDUES(a, b) \
11 (b).p, (b).limbs * sizeof(mbedtls_mpi_uint))
238 mbedtls_mpi_mod_residue b = { NULL, 0 };
254 TEST_EQUAL(0, test_read_residue(&b, &m, input_B, expected_ret != 0));
267 mbedtls_mpi_mod_sub(&x, &a, &b, &m));
279 mbedtls_mpi_mod_sub(&x, &a, &b, &m));
285 /* Negative testing with too many/too few limbs in a and b is covered by
293 /* a - b => Correct result, or expected error */
294 TEST_EQUAL(expected_ret, mbedtls_mpi_mod_sub(&x, &a, &b, &m));
301 /* a - b: alias x to a => Correct result */
303 TEST_EQUAL(0, mbedtls_mpi_mod_sub(&x, &x, &b, &m));
306 /* a - b: alias x to b => Correct result */
307 memcpy(x.p, b.p, bytes);
311 if (memcmp(a.p, b.p, bytes) == 0) {
312 /* a == b: alias a and b */
318 /* a - a: x, a, b all aliased together => Correct result */
329 mbedtls_free(b.p);
441 mbedtls_mpi_mod_residue b = { NULL, 0 };
457 TEST_EQUAL(0, test_read_residue(&b, &m, input_B, expected_ret != 0));
470 mbedtls_mpi_mod_add(&x, &a, &b, &m));
482 mbedtls_mpi_mod_add(&x, &a, &b, &m));
488 /* Negative testing with too many/too few limbs in a and b is covered by
498 TEST_EQUAL(expected_ret, mbedtls_mpi_mod_add(&x, &a, &b, &m));
505 /* a + b: alias x to a => Correct result */
507 TEST_EQUAL(0, mbedtls_mpi_mod_add(&x, &x, &b, &m));
510 /* a + b: alias x to b => Correct result */
511 memcpy(x.p, b.p, bytes);
515 if (memcmp(a.p, b.p, bytes) == 0) {
516 /* a == b: alias a and b */
522 /* a + a: x, a, b all aliased together => Correct result */
533 mbedtls_free(b.p);