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

ecp_curves: Added unit-tests for secp256k1

This patch introduces basic unit-testing for the `ecp_mod_p256k1()`.

The method is exposed through the ecp_invasive interface, and
the standard testing data is being provided by the python framework.

Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
This commit is contained in:
Minos Galanakis
2023-04-11 17:25:31 +01:00
parent 4bf08f86bb
commit d6751dcd8b
4 changed files with 120 additions and 2 deletions

View File

@ -186,6 +186,13 @@ int mbedtls_ecp_mod_p224k1(mbedtls_mpi *N);
#endif /* MBEDTLS_ECP_DP_SECP224K1_ENABLED */
#if defined(MBEDTLS_ECP_DP_SECP256K1_ENABLED)
MBEDTLS_STATIC_TESTABLE
int ecp_mod_p256k1(mbedtls_mpi *N);
#endif /* MBEDTLS_ECP_DP_SECP256K1_ENABLED */
/** Initialise a modulus with hard-coded const curve data.
*
* \note The caller is responsible for the \p N modulus' memory.