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>
This commit is contained in:
Janos Follath 2022-08-22 09:06:32 +01:00
parent deb8030e9f
commit af3f39c01c
5 changed files with 16 additions and 16 deletions

View file

@ -229,7 +229,7 @@ int mbedtls_mpi_core_write_le( const mbedtls_mpi_uint *A,
{
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 @@ int mbedtls_mpi_core_write_be( const mbedtls_mpi_uint *X,
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 @@ int mbedtls_mpi_core_write_be( const mbedtls_mpi_uint *X,
}
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;

View file

@ -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 @@ size_t mbedtls_mpi_core_clz( const mbedtls_mpi_uint a );
*
* \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 @@ size_t mbedtls_mpi_core_bitlen( const mbedtls_mpi_uint *A, size_t a_limbs );
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 @@ int mbedtls_mpi_core_read_le( mbedtls_mpi_uint *X,
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 @@ int mbedtls_mpi_core_read_be( mbedtls_mpi_uint *X,
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 @@ int mbedtls_mpi_core_write_le( const mbedtls_mpi_uint *A,
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

View file

@ -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 @@ int mbedtls_mpi_mod_raw_read( mbedtls_mpi_uint *X,
{
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 );

View file

@ -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