mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-02-22 00:40:41 +00:00
bignum_mod_raw: Renamed m
-> N in mbedtls_mpi_mod_raw_write()
Signed-off-by: Mihir Raj Singh <mihirrajsingh123@gmail.com>
This commit is contained in:
parent
cd17ff0354
commit
01e861ff9e
@ -85,19 +85,19 @@ cleanup:
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
int mbedtls_mpi_mod_raw_write(const mbedtls_mpi_uint *A,
|
int mbedtls_mpi_mod_raw_write( const mbedtls_mpi_uint *A,
|
||||||
const mbedtls_mpi_mod_modulus *m,
|
const mbedtls_mpi_mod_modulus *N,
|
||||||
unsigned char *output,
|
unsigned char *output,
|
||||||
size_t output_length,
|
size_t output_length,
|
||||||
mbedtls_mpi_mod_ext_rep ext_rep)
|
mbedtls_mpi_mod_ext_rep ext_rep )
|
||||||
{
|
{
|
||||||
switch (ext_rep) {
|
switch (ext_rep) {
|
||||||
case MBEDTLS_MPI_MOD_EXT_REP_LE:
|
case MBEDTLS_MPI_MOD_EXT_REP_LE:
|
||||||
return mbedtls_mpi_core_write_le(A, m->limbs,
|
return( mbedtls_mpi_core_write_le( A, N->limbs,
|
||||||
output, output_length);
|
output, output_length ) );
|
||||||
case MBEDTLS_MPI_MOD_EXT_REP_BE:
|
case MBEDTLS_MPI_MOD_EXT_REP_BE:
|
||||||
return mbedtls_mpi_core_write_be(A, m->limbs,
|
return( mbedtls_mpi_core_write_be( A, N->limbs,
|
||||||
output, output_length);
|
output, output_length ) );
|
||||||
default:
|
default:
|
||||||
return MBEDTLS_ERR_MPI_BAD_INPUT_DATA;
|
return MBEDTLS_ERR_MPI_BAD_INPUT_DATA;
|
||||||
}
|
}
|
||||||
|
@ -167,10 +167,10 @@ int mbedtls_mpi_mod_raw_read( mbedtls_mpi_uint *X,
|
|||||||
|
|
||||||
/** Export A into unsigned binary data.
|
/** Export A into unsigned binary data.
|
||||||
*
|
*
|
||||||
* \param[in] A The address of the MPI. The size is determined by \p m.
|
* \param[in] A The address of the MPI. The size is determined by \p N.
|
||||||
* (In particular, it must have at least as many limbs as
|
* (In particular, it must have at least as many limbs as
|
||||||
* the modulus \p m.)
|
* the modulus \p N.)
|
||||||
* \param[in] m The address of the modulus related to \p A.
|
* \param[in] N The address of the modulus related to \p A.
|
||||||
* \param[out] output The output buffer to export to.
|
* \param[out] output The output buffer to export to.
|
||||||
* \param output_length The length in bytes of \p output.
|
* \param output_length The length in bytes of \p output.
|
||||||
* \param ext_rep The endianness in which the number should be written into the output buffer.
|
* \param ext_rep The endianness in which the number should be written into the output buffer.
|
||||||
@ -179,13 +179,13 @@ int mbedtls_mpi_mod_raw_read( mbedtls_mpi_uint *X,
|
|||||||
* \return #MBEDTLS_ERR_MPI_BUFFER_TOO_SMALL if \p output isn't
|
* \return #MBEDTLS_ERR_MPI_BUFFER_TOO_SMALL if \p output isn't
|
||||||
* large enough to hold the value of \p A.
|
* large enough to hold the value of \p A.
|
||||||
* \return #MBEDTLS_ERR_MPI_BAD_INPUT_DATA if the external representation
|
* \return #MBEDTLS_ERR_MPI_BAD_INPUT_DATA if the external representation
|
||||||
* of \p m is invalid.
|
* of \p N is invalid.
|
||||||
*/
|
*/
|
||||||
int mbedtls_mpi_mod_raw_write(const mbedtls_mpi_uint *A,
|
int mbedtls_mpi_mod_raw_write( const mbedtls_mpi_uint *A,
|
||||||
const mbedtls_mpi_mod_modulus *m,
|
const mbedtls_mpi_mod_modulus *N,
|
||||||
unsigned char *output,
|
unsigned char *output,
|
||||||
size_t output_length,
|
size_t output_length,
|
||||||
mbedtls_mpi_mod_ext_rep ext_rep);
|
mbedtls_mpi_mod_ext_rep ext_rep );
|
||||||
|
|
||||||
/* BEGIN MERGE SLOT 1 */
|
/* BEGIN MERGE SLOT 1 */
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user