1
0
mirror of https://github.com/Mbed-TLS/mbedtls.git synced 2025-07-30 22:43:08 +03:00

Rename function to follow naming convention

Signed-off-by: Gabor Mezei <gabor.mezei@arm.com>
This commit is contained in:
Gabor Mezei
2023-02-06 17:13:02 +01:00
parent b1c62caa1f
commit b62ad5d569
3 changed files with 5 additions and 5 deletions

View File

@ -4585,7 +4585,7 @@ static int ecp_mod_p384(mbedtls_mpi *);
#if defined(MBEDTLS_ECP_DP_SECP521R1_ENABLED) #if defined(MBEDTLS_ECP_DP_SECP521R1_ENABLED)
static int ecp_mod_p521(mbedtls_mpi *); static int ecp_mod_p521(mbedtls_mpi *);
MBEDTLS_STATIC_TESTABLE MBEDTLS_STATIC_TESTABLE
int ecp_mod_p521_raw(mbedtls_mpi_uint *N_p, size_t N_n); int mbedtls_ecp_mod_p521_raw(mbedtls_mpi_uint *N_p, size_t N_n);
#endif #endif
#define NIST_MODP(P) grp->modp = ecp_mod_ ## P; #define NIST_MODP(P) grp->modp = ecp_mod_ ## P;
@ -5205,13 +5205,13 @@ static int ecp_mod_p521(mbedtls_mpi *N)
int ret = MBEDTLS_ERR_ERROR_CORRUPTION_DETECTED; int ret = MBEDTLS_ERR_ERROR_CORRUPTION_DETECTED;
size_t expected_width = 2 * ((521 + biL - 1) / biL); size_t expected_width = 2 * ((521 + biL - 1) / biL);
MBEDTLS_MPI_CHK(mbedtls_mpi_grow(N, expected_width)); MBEDTLS_MPI_CHK(mbedtls_mpi_grow(N, expected_width));
ret = ecp_mod_p521_raw(N->p, expected_width); ret = mbedtls_ecp_mod_p521_raw(N->p, expected_width);
cleanup: cleanup:
return ret; return ret;
} }
MBEDTLS_STATIC_TESTABLE MBEDTLS_STATIC_TESTABLE
int ecp_mod_p521_raw(mbedtls_mpi_uint *N_p, size_t N_n) int mbedtls_ecp_mod_p521_raw(mbedtls_mpi_uint *N_p, size_t N_n)
{ {
mbedtls_mpi_uint carry = 0; mbedtls_mpi_uint carry = 0;

View File

@ -104,7 +104,7 @@ int mbedtls_ecp_mod_p192_raw(mbedtls_mpi_uint *Np, size_t Nn);
* \param[in] N_n The length of \p N_p in limbs. * \param[in] N_n The length of \p N_p in limbs.
*/ */
MBEDTLS_STATIC_TESTABLE MBEDTLS_STATIC_TESTABLE
int ecp_mod_p521_raw(mbedtls_mpi_uint *N_p, size_t N_n); int mbedtls_ecp_mod_p521_raw(mbedtls_mpi_uint *N_p, size_t N_n);
#endif /* MBEDTLS_ECP_DP_SECP521R1_ENABLED */ #endif /* MBEDTLS_ECP_DP_SECP521R1_ENABLED */

View File

@ -1374,7 +1374,7 @@ void ecp_mod_p521_raw(char *input_N,
&m, N, limbs, &m, N, limbs,
MBEDTLS_MPI_MOD_REP_MONTGOMERY), 0); MBEDTLS_MPI_MOD_REP_MONTGOMERY), 0);
TEST_EQUAL(ecp_mod_p521_raw(X, limbs_X), 0); TEST_EQUAL(mbedtls_ecp_mod_p521_raw(X, limbs_X), 0);
mbedtls_mpi_mod_raw_fix_quasi_reduction(X, &m); mbedtls_mpi_mod_raw_fix_quasi_reduction(X, &m);
ASSERT_COMPARE(X, bytes, res, bytes); ASSERT_COMPARE(X, bytes, res, bytes);