Add check for test

Check the bit length of the output of ecp_mod_p521_raw.

Signed-off-by: Gabor Mezei <gabor.mezei@arm.com>
This commit is contained in:
Gabor Mezei 2023-02-15 17:13:20 +01:00
parent 2b064ec332
commit 555b1f7e44
No known key found for this signature in database
GPG Key ID: FEE76C0CF8C6267D

View File

@ -1375,6 +1375,7 @@ void ecp_mod_p521_raw(char *input_N,
MBEDTLS_MPI_MOD_REP_MONTGOMERY), 0);
TEST_EQUAL(mbedtls_ecp_mod_p521_raw(X, limbs_X), 0);
TEST_LE_U(mbedtls_mpi_core_bitlen(X, limbs_X), 522);
mbedtls_mpi_mod_raw_fix_quasi_reduction(X, &m);
ASSERT_COMPARE(X, bytes, res, bytes);