mirror of
https://github.com/cuberite/polarssl.git
synced 2025-09-30 08:56:50 -04:00
Change the p256_raw fuction to be testable
Signed-off-by: Gabor Mezei <gabor.mezei@arm.com>
This commit is contained in:
parent
ab6ac91a0a
commit
5221c04b92
@ -4580,7 +4580,8 @@ int mbedtls_ecp_mod_p224_raw(mbedtls_mpi_uint *X, size_t X_limbs);
|
|||||||
#endif
|
#endif
|
||||||
#if defined(MBEDTLS_ECP_DP_SECP256R1_ENABLED)
|
#if defined(MBEDTLS_ECP_DP_SECP256R1_ENABLED)
|
||||||
static int ecp_mod_p256(mbedtls_mpi *);
|
static int ecp_mod_p256(mbedtls_mpi *);
|
||||||
static int ecp_mod_p256_raw(mbedtls_mpi_uint *Np, size_t Nn);
|
MBEDTLS_STATIC_TESTABLE
|
||||||
|
int ecp_mod_p256_raw(mbedtls_mpi_uint *Np, size_t Nn);
|
||||||
#endif
|
#endif
|
||||||
#if defined(MBEDTLS_ECP_DP_SECP384R1_ENABLED)
|
#if defined(MBEDTLS_ECP_DP_SECP384R1_ENABLED)
|
||||||
static int ecp_mod_p384(mbedtls_mpi *);
|
static int ecp_mod_p384(mbedtls_mpi *);
|
||||||
@ -5113,7 +5114,9 @@ static int ecp_mod_p256(mbedtls_mpi *N)
|
|||||||
cleanup:
|
cleanup:
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
static int ecp_mod_p256_raw(mbedtls_mpi_uint *Np, size_t Nn)
|
|
||||||
|
MBEDTLS_STATIC_TESTABLE
|
||||||
|
int ecp_mod_p256_raw(mbedtls_mpi_uint *Np, size_t Nn)
|
||||||
{
|
{
|
||||||
if (Nn != 2*((256 + biL - 1)/biL)) {
|
if (Nn != 2*((256 + biL - 1)/biL)) {
|
||||||
return MBEDTLS_ERR_ECP_BAD_INPUT_DATA;
|
return MBEDTLS_ERR_ECP_BAD_INPUT_DATA;
|
||||||
|
@ -116,6 +116,13 @@ int mbedtls_ecp_mod_p224_raw(mbedtls_mpi_uint *X, size_t X_limbs);
|
|||||||
|
|
||||||
#endif /* MBEDTLS_ECP_DP_SECP224R1_ENABLED */
|
#endif /* MBEDTLS_ECP_DP_SECP224R1_ENABLED */
|
||||||
|
|
||||||
|
#if defined(MBEDTLS_ECP_DP_SECP256R1_ENABLED)
|
||||||
|
|
||||||
|
MBEDTLS_STATIC_TESTABLE
|
||||||
|
int ecp_mod_p256_raw(mbedtls_mpi_uint *Np, size_t Nn);
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
#if defined(MBEDTLS_ECP_DP_SECP521R1_ENABLED)
|
#if defined(MBEDTLS_ECP_DP_SECP521R1_ENABLED)
|
||||||
|
|
||||||
/** Fast quasi-reduction modulo p521 = 2^521 - 1 (FIPS 186-3 D.2.5)
|
/** Fast quasi-reduction modulo p521 = 2^521 - 1 (FIPS 186-3 D.2.5)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user