Fix typos

Co-authored-by: Tom Cosgrove <81633263+tom-cosgrove-arm@users.noreply.github.com>
Co-authored-by: Werner Lewis <Werner.Lewis@arm.com>

Signed-off-by: Janos Follath <janos.follath@arm.com>
diff --git a/library/bignum_core.c b/library/bignum_core.c
index 9d1e29c..68c49df 100644
--- a/library/bignum_core.c
+++ b/library/bignum_core.c
@@ -229,7 +229,7 @@
     {
         bytes_to_copy = output_length;
 
-        /* The output outputfer is smaller than the allocated size of A.
+        /* The output buffer is smaller than the allocated size of A.
          * However A may fit if its leading bytes are zero. */
         for( size_t i = bytes_to_copy; i < stored_bytes; i++ )
         {
@@ -263,7 +263,7 @@
 
     if( stored_bytes < output_length )
     {
-        /* There is enough space in the output outputfer. Write initial
+        /* There is enough space in the output buffer. Write initial
          * null bytes and record the position at which to start
          * writing the significant bytes. In this case, the execution
          * trace of this function does not depend on the value of the
@@ -274,7 +274,7 @@
     }
     else
     {
-        /* The output outputfer is smaller than the allocated size of X.
+        /* The output buffer is smaller than the allocated size of X.
          * However X may fit if its leading bytes are zero. */
         bytes_to_copy = output_length;
         p = output;
diff --git a/library/bignum_core.h b/library/bignum_core.h
index c75be26..37f3617 100644
--- a/library/bignum_core.h
+++ b/library/bignum_core.h
@@ -1,9 +1,9 @@
 /**
  *  Core bignum functions
  *
- *  This interface only should be used by the legacy bignum module (bignum.h)
+ *  This interface should only be used by the legacy bignum module (bignum.h)
  *  and the modular bignum modules (bignum_mod.c, bignum_mod_raw.c). All other
- *  modules should use the high level modular bignum interface (bignum_mod.h)
+ *  modules should use the high-level modular bignum interface (bignum_mod.h)
  *  or the legacy bignum interface (bignum.h).
  *
  *  Copyright The Mbed TLS Contributors
@@ -49,7 +49,7 @@
  *
  * \return      The number of bits in \p A.
  */
-size_t mbedtls_mpi_core_bitlen( const mbedtls_mpi_uint *A, size_t a_limbs );
+size_t mbedtls_mpi_core_bitlen( const mbedtls_mpi_uint *A, size_t A_limbs );
 
 /** Convert a big-endian byte array aligned to the size of mbedtls_mpi_uint
  * into the storage form used by mbedtls_mpi.
@@ -60,7 +60,7 @@
 void mbedtls_mpi_core_bigendian_to_host( mbedtls_mpi_uint *A,
                                          size_t limbs );
 
-/** Import X from unsigned binary data, little endian.
+/** Import X from unsigned binary data, little-endian.
  *
  * The MPI needs to have enough limbs to store the full value (including any
  * most significant zero bytes in the input).
@@ -79,7 +79,7 @@
                               const unsigned char *input,
                               size_t input_length );
 
-/** Import X from unsigned binary data, big endian.
+/** Import X from unsigned binary data, big-endian.
  *
  * The MPI needs to have enough limbs to store the full value (including any
  * most significant zero bytes in the input).
@@ -101,7 +101,7 @@
                               const unsigned char *input,
                               size_t input_length );
 
-/** Export A into unsigned binary data, little endian.
+/** Export A into unsigned binary data, little-endian.
  *
  * \note If \p output is shorter than \p A the export is still successful if the
  *       value held in \p A fits in the buffer (that is, if enough of the most
@@ -121,7 +121,7 @@
                                unsigned char *output,
                                size_t output_length );
 
-/** Export A into unsigned binary data, big endian.
+/** Export A into unsigned binary data, big-endian.
  *
  * \note If \p output is shorter than \p A the export is still successful if the
  *       value held in \p A fits in the buffer (that is, if enough of the most
diff --git a/library/bignum_mod_raw.c b/library/bignum_mod_raw.c
index 88311dd..8c89b2c 100644
--- a/library/bignum_mod_raw.c
+++ b/library/bignum_mod_raw.c
@@ -44,7 +44,7 @@
 int mbedtls_mpi_mod_raw_read( mbedtls_mpi_uint *X,
                               const mbedtls_mpi_mod_modulus *m,
                               const unsigned char *input,
-                              size_t input_lentgth )
+                              size_t input_length )
 {
     int ret = MBEDTLS_ERR_ERROR_CORRUPTION_DETECTED;
 
@@ -52,11 +52,11 @@
     {
         case MBEDTLS_MPI_MOD_EXT_REP_LE:
             ret = mbedtls_mpi_core_read_le( X, m->limbs,
-                                            input, input_lentgth );
+                                            input, input_length );
             break;
         case MBEDTLS_MPI_MOD_EXT_REP_BE:
             ret = mbedtls_mpi_core_read_be( X, m->limbs,
-                                            input, input_lentgth );
+                                            input, input_length );
             break;
         default:
             return( MBEDTLS_ERR_MPI_BAD_INPUT_DATA );
diff --git a/library/bignum_mod_raw.h b/library/bignum_mod_raw.h
index 4b2a51f..7b3a0c1 100644
--- a/library/bignum_mod_raw.h
+++ b/library/bignum_mod_raw.h
@@ -1,9 +1,9 @@
 /**
  *  Low-level modular bignum functions
  *
- *  This interface only should be used by the higher level modular bignum
+ *  This interface should only be used by the higher-level modular bignum
  *  module (bignum_mod.c) and the ECP module (ecp.c, ecp_curves.c). All other
- *  modules should use the high level modular bignum interface (bignum_mod.h)
+ *  modules should use the high-level modular bignum interface (bignum_mod.h)
  *  or the legacy bignum interface (bignum.h).
  *
  *  Copyright The Mbed TLS Contributors
diff --git a/library/constant_time_internal.h b/library/constant_time_internal.h
index a8518b4..fc24ae5 100644
--- a/library/constant_time_internal.h
+++ b/library/constant_time_internal.h
@@ -137,7 +137,7 @@
  *                 with the same allocated length as \p B.
  * \param B        The right-hand MPI. This must point to an array of limbs
  *                 with the same allocated length as \p A.
- * \param limbs     The number of limbs in \p A and \p B.
+ * \param limbs    The number of limbs in \p A and \p B.
  *
  * \return         The result of the comparison:
  *                 \c 1 if \p A is less than \p B.