1
0
mirror of https://github.com/Mbed-TLS/mbedtls.git synced 2025-07-29 11:41:15 +03:00

Change the ecp_mod_p521_raw to be testable

Signed-off-by: Gabor Mezei <gabor.mezei@arm.com>
This commit is contained in:
Gabor Mezei
2023-02-01 14:02:16 +01:00
parent 8450ab9c60
commit 2cb630edee
2 changed files with 12 additions and 1 deletions

View File

@ -4584,6 +4584,8 @@ static int ecp_mod_p384(mbedtls_mpi *);
#endif
#if defined(MBEDTLS_ECP_DP_SECP521R1_ENABLED)
static int ecp_mod_p521(mbedtls_mpi *);
MBEDTLS_STATIC_TESTABLE
int ecp_mod_p521_raw(mbedtls_mpi_uint *N_p, size_t N_n);
#endif
#define NIST_MODP(P) grp->modp = ecp_mod_ ## P;
@ -5207,7 +5209,9 @@ static int ecp_mod_p521(mbedtls_mpi *N)
cleanup:
return ret;
}
static int ecp_mod_p521_raw(mbedtls_mpi_uint *N_p, size_t N_n)
MBEDTLS_STATIC_TESTABLE
int ecp_mod_p521_raw(mbedtls_mpi_uint *N_p, size_t N_n)
{
mbedtls_mpi_uint carry = 0;