Skip to content

Commit

Permalink
Use macro guard for function declaration
Browse files Browse the repository at this point in the history
Signed-off-by: Gabor Mezei <[email protected]>
  • Loading branch information
gabor-mezei-arm committed Apr 11, 2023
1 parent c4cf0bd commit 99251fc
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions library/ecp_invasive.h
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,17 @@ int mbedtls_ecp_mod_p384_raw(mbedtls_mpi_uint *X, size_t X_limbs);

#endif /* MBEDTLS_ECP_DP_SECP384R1_ENABLED */

#if defined(MBEDTLS_ECP_DP_SECP192K1_ENABLED)

/*
* Fast quasi-reduction modulo p192k1 = 2^192 - R,
* with R = 2^32 + 2^12 + 2^8 + 2^7 + 2^6 + 2^3 + 1 = 0x0100001119
*/
MBEDTLS_STATIC_TESTABLE
int mbedtls_ecp_mod_p192k1(mbedtls_mpi *N);

#endif /* MBEDTLS_ECP_DP_SECP192K1_ENABLED */

/** Initialise a modulus with hard-coded const curve data.
*
* \note The caller is responsible for the \p N modulus' memory.
Expand All @@ -191,9 +202,6 @@ int mbedtls_ecp_modulus_setup(mbedtls_mpi_mod_modulus *N,
const mbedtls_ecp_group_id id,
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_ECP_INVASIVE_H */

0 comments on commit 99251fc

Please sign in to comment.