From b0354c5b71a1b96b011057f5e01ec9723ea17ed1 Mon Sep 17 00:00:00 2001 From: Mihir Raj Singh Date: Wed, 11 Jan 2023 21:10:22 +0530 Subject: [PATCH] bignum_mod_raw: Renamed `m` -> N in mbedtls_mpi_mod_raw_from_mont_rep() Signed-off-by: Mihir Raj Singh --- library/bignum_mod_raw.c | 8 ++++---- library/bignum_mod_raw.h | 10 +++++----- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/library/bignum_mod_raw.c b/library/bignum_mod_raw.c index 8ca12d657..0f575fca6 100644 --- a/library/bignum_mod_raw.c +++ b/library/bignum_mod_raw.c @@ -247,17 +247,17 @@ int mbedtls_mpi_mod_raw_to_mont_rep( mbedtls_mpi_uint *X, return 0; } -int mbedtls_mpi_mod_raw_from_mont_rep(mbedtls_mpi_uint *X, - const mbedtls_mpi_mod_modulus *m) +int mbedtls_mpi_mod_raw_from_mont_rep( mbedtls_mpi_uint *X, + const mbedtls_mpi_mod_modulus *N ) { - 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 ); mbedtls_mpi_uint *T; if ((T = (mbedtls_mpi_uint *) mbedtls_calloc(t_limbs, ciL)) == NULL) { return MBEDTLS_ERR_MPI_ALLOC_FAILED; } - mbedtls_mpi_core_from_mont_rep(X, X, m->p, m->limbs, m->rep.mont.mm, T); + mbedtls_mpi_core_from_mont_rep( X, X, N->p, N->limbs, N->rep.mont.mm, T ); mbedtls_platform_zeroize(T, t_limbs * ciL); mbedtls_free(T); diff --git a/library/bignum_mod_raw.h b/library/bignum_mod_raw.h index 4d5bf4111..ed616782a 100644 --- a/library/bignum_mod_raw.h +++ b/library/bignum_mod_raw.h @@ -422,14 +422,14 @@ int mbedtls_mpi_mod_raw_to_mont_rep( mbedtls_mpi_uint *X, /** Convert an MPI back from Montgomery representation. * * \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_from_mont_rep(mbedtls_mpi_uint *X, - const mbedtls_mpi_mod_modulus *m); +int mbedtls_mpi_mod_raw_from_mont_rep( mbedtls_mpi_uint *X, + const mbedtls_mpi_mod_modulus *N ); /** \brief Perform fixed width modular negation. *