Minor improvements to bignum module
diff --git a/include/mbedtls/bignum.h b/include/mbedtls/bignum.h
index 7b80838..141a8e9 100644
--- a/include/mbedtls/bignum.h
+++ b/include/mbedtls/bignum.h
@@ -196,7 +196,7 @@
void mbedtls_mpi_init( mbedtls_mpi *X );
/**
- * \brief This function frees the components an MPI context.
+ * \brief This function frees the components of an MPI context.
*
* \param X The MPI context to be cleared. This may be \c NULL,
* in which case this function is a no-op. If it is
@@ -693,7 +693,7 @@
* \param R The destination MPI for the remainder value.
* This may be \c NULL if the value of the
* remainder is not needed.
- * \param A The divident. This must point to an initialized MPi.
+ * \param A The dividend. This must point to an initialized MPi.
* \param B The divisor. This must point to an initialized MPI.
*
* \return \c 0 if successful.
@@ -714,7 +714,7 @@
* \param R The destination MPI for the remainder value.
* This may be \c NULL if the value of the
* remainder is not needed.
- * \param A The divident. This must point to an initialized MPi.
+ * \param A The dividend. This must point to an initialized MPi.
* \param b The divisor.
*
* \return \c 0 if successful.
@@ -776,7 +776,7 @@
* \param _RR A helper MPI depending solely on \p N which can be used to
* speed-up multiple modular exponentiations for the same value
* of \p N. This may be \c NULL. If it is not \c NULL, it must
- * point an initialized MPI. If it hasn't been used after
+ * point to an initialized MPI. If it hasn't been used after
* the call to mbedtls_mpi_init(), this function will compute
* the helper value and store it in \p _RR for reuse on
* subsequent calls to this function. Otherwise, the function
diff --git a/library/bignum.c b/library/bignum.c
index 8b01bad..0d0d922 100644
--- a/library/bignum.c
+++ b/library/bignum.c
@@ -724,7 +724,7 @@
size_t i, j;
size_t const limbs = CHARS_TO_LIMBS( buflen );
- MPI_VALIDATE_RET( X != NULL );
+ MPI_VALIDATE_RET( X != NULL );
MPI_VALIDATE_RET( buflen == 0 || buf != NULL );
/* Ensure that target MPI has exactly the necessary number of limbs */
@@ -2009,7 +2009,7 @@
{
int ret;
unsigned char buf[MBEDTLS_MPI_MAX_SIZE];
- MPI_VALIDATE_RET( X != NULL );
+ MPI_VALIDATE_RET( X != NULL );
MPI_VALIDATE_RET( f_rng != NULL );
if( size > MBEDTLS_MPI_MAX_SIZE )
@@ -2192,7 +2192,7 @@
size_t i, j, k, s;
mbedtls_mpi W, R, T, A, RR;
- MPI_VALIDATE_RET( X != NULL );
+ MPI_VALIDATE_RET( X != NULL );
MPI_VALIDATE_RET( f_rng != NULL );
mbedtls_mpi_init( &W ); mbedtls_mpi_init( &R );
@@ -2284,7 +2284,7 @@
{
int ret;
mbedtls_mpi XX;
- MPI_VALIDATE_RET( X != NULL );
+ MPI_VALIDATE_RET( X != NULL );
MPI_VALIDATE_RET( f_rng != NULL );
XX.s = 1;
@@ -2317,7 +2317,7 @@
int (*f_rng)(void *, unsigned char *, size_t),
void *p_rng )
{
- MPI_VALIDATE_RET( X != NULL );
+ MPI_VALIDATE_RET( X != NULL );
MPI_VALIDATE_RET( f_rng != NULL );
/*
@@ -2353,7 +2353,7 @@
mbedtls_mpi_uint r;
mbedtls_mpi Y;
- MPI_VALIDATE_RET( X != NULL );
+ MPI_VALIDATE_RET( X != NULL );
MPI_VALIDATE_RET( f_rng != NULL );
if( nbits < 3 || nbits > MBEDTLS_MPI_MAX_BITS )