Remove unnecessary testing and documentation

Signed-off-by: Waleed Elmelegy <waleed.elmelegy@arm.com>
This commit is contained in:
Waleed Elmelegy 2024-05-28 11:15:21 +00:00
parent a9fe03ea4e
commit 473dea26a6
2 changed files with 1 additions and 7 deletions

View File

@ -377,7 +377,7 @@ mbedtls_mpi_uint mbedtls_mpi_core_add_if(mbedtls_mpi_uint *X,
* either otherwise.
*
* This function operates in constant time with respect to the values
* of \p X and \p A and \p B.
* of \p A and \p B.
*
* \param[out] X The result of the subtraction.
* \param[in] A Little-endian presentation of left operand.

View File

@ -666,8 +666,6 @@ void mpi_core_sub(char *input_A, char *input_B,
/* 1a) r = a - b => we should get the correct carry */
TEST_EQUAL(carry, mbedtls_mpi_core_sub(r, a, b, limbs));
TEST_CF_PUBLIC(a, bytes);
TEST_CF_PUBLIC(b, bytes);
TEST_CF_PUBLIC(r, bytes);
/* 1b) r = a - b => we should get the correct result */
@ -678,12 +676,10 @@ void mpi_core_sub(char *input_A, char *input_B,
memcpy(r, a, bytes);
TEST_CF_SECRET(r, bytes);
TEST_CF_SECRET(b, bytes);
TEST_EQUAL(carry, mbedtls_mpi_core_sub(r, r, b, limbs));
TEST_CF_PUBLIC(r, bytes);
TEST_CF_PUBLIC(b, bytes);
/* 2b) r -= b => we should get the correct result */
TEST_MEMORY_COMPARE(r, bytes, x, bytes);
@ -692,12 +688,10 @@ void mpi_core_sub(char *input_A, char *input_B,
memcpy(r, b, bytes);
TEST_CF_SECRET(r, bytes);
TEST_CF_SECRET(a, bytes);
TEST_EQUAL(carry, mbedtls_mpi_core_sub(r, a, r, limbs));
TEST_CF_PUBLIC(r, bytes);
TEST_CF_PUBLIC(a, bytes);
/* 3b) r = a - b => we should get the correct result */
TEST_MEMORY_COMPARE(r, bytes, x, bytes);