bignum_mod_raw: Renamed m -> N in mbedtls_mpi_mod_raw_to_mont_rep()

Signed-off-by: Mihir Raj Singh <mihirrajsingh123@gmail.com>
This commit is contained in:
Mihir Raj Singh 2023-01-11 21:06:16 +05:30
parent 01e861ff9e
commit 37ece7292a
2 changed files with 10 additions and 10 deletions

View File

@ -229,18 +229,18 @@ int mbedtls_mpi_mod_raw_random(mbedtls_mpi_uint *X,
/* END MERGE SLOT 6 */
/* BEGIN MERGE SLOT 7 */
int mbedtls_mpi_mod_raw_to_mont_rep(mbedtls_mpi_uint *X,
const mbedtls_mpi_mod_modulus *m)
int mbedtls_mpi_mod_raw_to_mont_rep( mbedtls_mpi_uint *X,
const mbedtls_mpi_mod_modulus *N )
{
mbedtls_mpi_uint *T;
const size_t t_limbs = mbedtls_mpi_core_montmul_working_limbs(m->limbs);
const size_t t_limbs = mbedtls_mpi_core_montmul_working_limbs( N->limbs );
if ((T = (mbedtls_mpi_uint *) mbedtls_calloc(t_limbs, ciL)) == NULL) {
return MBEDTLS_ERR_MPI_ALLOC_FAILED;
}
mbedtls_mpi_core_to_mont_rep(X, X, m->p, m->limbs,
m->rep.mont.mm, m->rep.mont.rr, T);
mbedtls_mpi_core_to_mont_rep( X, X, N->p, N->limbs,
N->rep.mont.mm, N->rep.mont.rr, T );
mbedtls_platform_zeroize(T, t_limbs * ciL);
mbedtls_free(T);

View File

@ -410,14 +410,14 @@ int mbedtls_mpi_mod_raw_random(mbedtls_mpi_uint *X,
/** Convert an MPI into Montgomery form.
*
* \param X The address of the MPI.
* Must have the same number of limbs as \p m.
* \param m The address of the modulus, which gives the size of
* the base `R` = 2^(biL*m->limbs).
* Must have the same number of limbs as \p N.
* \param N The address of the modulus, which gives the size of
* the base `R` = 2^(biL*N->limbs).
*
* \return \c 0 if successful.
*/
int mbedtls_mpi_mod_raw_to_mont_rep(mbedtls_mpi_uint *X,
const mbedtls_mpi_mod_modulus *m);
int mbedtls_mpi_mod_raw_to_mont_rep( mbedtls_mpi_uint *X,
const mbedtls_mpi_mod_modulus *N );
/** Convert an MPI back from Montgomery representation.
*