diff --git a/library/bignum_mod.c b/library/bignum_mod.c index 1e9303df77..c42ffbf05c 100644 --- a/library/bignum_mod.c +++ b/library/bignum_mod.c @@ -351,30 +351,30 @@ int mbedtls_mpi_mod_random(mbedtls_mpi_mod_residue *X, /* END MERGE SLOT 6 */ /* BEGIN MERGE SLOT 7 */ -int mbedtls_mpi_mod_read(mbedtls_mpi_mod_residue *r, - const mbedtls_mpi_mod_modulus *m, - const unsigned char *buf, - size_t buflen, - mbedtls_mpi_mod_ext_rep ext_rep) +int mbedtls_mpi_mod_read( mbedtls_mpi_mod_residue *r, + const mbedtls_mpi_mod_modulus *N, + const unsigned char *buf, + size_t buflen, + mbedtls_mpi_mod_ext_rep ext_rep ) { int ret = MBEDTLS_ERR_MPI_BAD_INPUT_DATA; /* Do our best to check if r and m have been set up */ - if (r->limbs == 0 || m->limbs == 0) { + if (r->limbs == 0 || N->limbs == 0) { goto cleanup; } - if (r->limbs != m->limbs) { + if (r->limbs != N->limbs) { goto cleanup; } - ret = mbedtls_mpi_mod_raw_read(r->p, m, buf, buflen, ext_rep); + ret = mbedtls_mpi_mod_raw_read(r->p, N, buf, buflen, ext_rep); if (ret != 0) { goto cleanup; } - r->limbs = m->limbs; + r->limbs = N->limbs; - ret = mbedtls_mpi_mod_raw_canonical_to_modulus_rep(r->p, m); + ret = mbedtls_mpi_mod_raw_canonical_to_modulus_rep( r->p, N ); cleanup: return ret; diff --git a/library/bignum_mod.h b/library/bignum_mod.h index ad8a1dd37f..84f4e63795 100644 --- a/library/bignum_mod.h +++ b/library/bignum_mod.h @@ -401,16 +401,16 @@ int mbedtls_mpi_mod_random(mbedtls_mpi_mod_residue *X, /** Read a residue from a byte buffer. * * The residue will be automatically converted to the internal representation - * based on the value of the `m->int_rep` field. + * based on the value of the `N->int_rep` field. * - * The modulus \p m will be the modulus associated with \p r. The residue \p r - * should only be used in operations where the modulus is \p m or a modulus - * equivalent to \p m (in the sense that all their fields or memory pointed by + * The modulus \p N will be the modulus associated with \p r. The residue \p r + * should only be used in operations where the modulus is \p N or a modulus + * equivalent to \p N (in the sense that all their fields or memory pointed by * their fields hold the same value). * * \param[out] r The address of the residue. It must have exactly the same - * number of limbs as the modulus \p m. - * \param[in] m The address of the modulus. + * number of limbs as the modulus \p N. + * \param[in] N The address of the modulus. * \param[in] buf The input buffer to import from. * \param buflen The length in bytes of \p buf. * \param ext_rep The endianness of the number in the input buffer. @@ -419,13 +419,13 @@ int mbedtls_mpi_mod_random(mbedtls_mpi_mod_residue *X, * \return #MBEDTLS_ERR_MPI_BUFFER_TOO_SMALL if \p r isn't * large enough to hold the value in \p buf. * \return #MBEDTLS_ERR_MPI_BAD_INPUT_DATA if \p ext_rep - * is invalid or the value in the buffer is not less than \p m. + * is invalid or the value in the buffer is not less than \p N. */ -int mbedtls_mpi_mod_read(mbedtls_mpi_mod_residue *r, - const mbedtls_mpi_mod_modulus *m, - const unsigned char *buf, - size_t buflen, - mbedtls_mpi_mod_ext_rep ext_rep); +int mbedtls_mpi_mod_read( mbedtls_mpi_mod_residue *r, + const mbedtls_mpi_mod_modulus *N, + const unsigned char *buf, + size_t buflen, + mbedtls_mpi_mod_ext_rep ext_rep ); /** Write a residue into a byte buffer. *