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:
parent
deb8030e9f
commit
af3f39c01c
5 changed files with 16 additions and 16 deletions
|
@ -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;
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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 );
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -137,7 +137,7 @@ unsigned mbedtls_ct_mpi_uint_lt( const mbedtls_mpi_uint x,
|
|||
* 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.
|
||||
|
|
Loading…
Reference in a new issue