mirror of
https://github.com/ARMmbed/mbedtls.git
synced 2025-05-12 01:42:21 +08:00
Add a testable function for ecp_mod_p192k1
Signed-off-by: Gabor Mezei <gabor.mezei@arm.com>
This commit is contained in:
parent
6d3ec55849
commit
83669d910e
@ -4608,6 +4608,8 @@ static int ecp_mod_p448(mbedtls_mpi *);
|
|||||||
#endif
|
#endif
|
||||||
#if defined(MBEDTLS_ECP_DP_SECP192K1_ENABLED)
|
#if defined(MBEDTLS_ECP_DP_SECP192K1_ENABLED)
|
||||||
static int ecp_mod_p192k1(mbedtls_mpi *);
|
static int ecp_mod_p192k1(mbedtls_mpi *);
|
||||||
|
MBEDTLS_TEST_HOOKS
|
||||||
|
int mbedtls_ecp_mod_p192k1(mbedtls_mpi *);
|
||||||
#endif
|
#endif
|
||||||
#if defined(MBEDTLS_ECP_DP_SECP224K1_ENABLED)
|
#if defined(MBEDTLS_ECP_DP_SECP224K1_ENABLED)
|
||||||
static int ecp_mod_p224k1(mbedtls_mpi *);
|
static int ecp_mod_p224k1(mbedtls_mpi *);
|
||||||
@ -5604,6 +5606,12 @@ cleanup:
|
|||||||
* with R = 2^32 + 2^12 + 2^8 + 2^7 + 2^6 + 2^3 + 1 = 0x0100001119
|
* with R = 2^32 + 2^12 + 2^8 + 2^7 + 2^6 + 2^3 + 1 = 0x0100001119
|
||||||
*/
|
*/
|
||||||
static int ecp_mod_p192k1(mbedtls_mpi *N)
|
static int ecp_mod_p192k1(mbedtls_mpi *N)
|
||||||
|
{
|
||||||
|
return mbedtls_ecp_mod_p192k1(N);
|
||||||
|
}
|
||||||
|
|
||||||
|
MBEDTLS_STATIC_TESTABLE
|
||||||
|
int mbedtls_ecp_mod_p192k1(mbedtls_mpi *N)
|
||||||
{
|
{
|
||||||
static mbedtls_mpi_uint Rp[] = {
|
static mbedtls_mpi_uint Rp[] = {
|
||||||
MBEDTLS_BYTES_TO_T_UINT_8(0xC9, 0x11, 0x00, 0x00, 0x01, 0x00, 0x00,
|
MBEDTLS_BYTES_TO_T_UINT_8(0xC9, 0x11, 0x00, 0x00, 0x01, 0x00, 0x00,
|
||||||
|
@ -191,6 +191,9 @@ int mbedtls_ecp_modulus_setup(mbedtls_mpi_mod_modulus *N,
|
|||||||
const mbedtls_ecp_group_id id,
|
const mbedtls_ecp_group_id id,
|
||||||
const mbedtls_ecp_curve_type ctype);
|
const mbedtls_ecp_curve_type ctype);
|
||||||
|
|
||||||
|
MBEDTLS_STATIC_TESTABLE
|
||||||
|
int mbedtls_ecp_mod_p192k1(mbedtls_mpi *N);
|
||||||
|
|
||||||
#endif /* MBEDTLS_TEST_HOOKS && MBEDTLS_ECP_C */
|
#endif /* MBEDTLS_TEST_HOOKS && MBEDTLS_ECP_C */
|
||||||
|
|
||||||
#endif /* MBEDTLS_ECP_INVASIVE_H */
|
#endif /* MBEDTLS_ECP_INVASIVE_H */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user