From 6a31b7252d610884d770bab9ffcd1b80936fb415 Mon Sep 17 00:00:00 2001 From: Gabor Mezei Date: Fri, 16 Dec 2022 15:24:03 +0100 Subject: [PATCH] Fix documentation Signed-off-by: Gabor Mezei --- library/bignum_mod.h | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/library/bignum_mod.h b/library/bignum_mod.h index f8c71d01ba..d2f6cee5e0 100644 --- a/library/bignum_mod.h +++ b/library/bignum_mod.h @@ -220,29 +220,29 @@ void mbedtls_mpi_mod_modulus_free( mbedtls_mpi_mod_modulus *m ); /** \brief Multiply two residues, returning the residue modulo the specified * modulus. * - * \note Currenty handles the case when `m->int_rep` is + * \note Currently handles the case when `N->int_rep` is * MBEDTLS_MPI_MOD_REP_MONTGOMERY. * - * The size of the operation is determined by \p N. \p A and \p B must have - * the same number of limbs as \p N. + * The size of the operation is determined by \p N. \p A, \p B and \p X must + * all be associated with the modulus \p N and must all have the same number + * of limbs as \p N. * * \p X may be aliased to \p A or \p B, or even both, but may not overlap * either otherwise. They may not alias \p N (since they must be in canonical * form, they cannot == \p N). * - * \param[out] X The address of the result MPI. - * This must be initialized. Must have enough limbs to - * store the full value of the result. + * \param[out] X The address of the result MPI. Must have the same + * number of limbs as \p N. * On successful completion, \p X contains the result of * the multiplication `A * B * R^-1` mod N where - * `R = 2^(biL *N->limbs)`. - * \param[in] A The address of the first MPI. This must be initialized. - * \param[in] B The address of the second MPI. This must be initialized. + * `R = 2^(biL * N->limbs)`. + * \param[in] A The address of the first MPI. + * \param[in] B The address of the second MPI. * \param[in] N The address of the modulus. Used to perform a modulo * operation on the result of the multiplication. * * \return \c 0 if successful. - * \return #MBEDTLS_ERR_MPI_BAD_INPUT_DATA if all the parameters does not + * \return #MBEDTLS_ERR_MPI_BAD_INPUT_DATA if all the parameters do not * have the same number of limbs or \p N is invalid. * \return #MBEDTLS_ERR_MPI_ALLOC_FAILED on memory-allocation failure. */