mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-03-28 19:21:08 +00:00
Remove retrun code from mod_raw_cond_assign/swap
Signed-off-by: Gabor Mezei <gabor.mezei@arm.com>
This commit is contained in:
parent
24d183aa00
commit
63c3282ec4
@ -41,22 +41,22 @@
|
|||||||
#include "bignum_mod.h"
|
#include "bignum_mod.h"
|
||||||
#include "constant_time_internal.h"
|
#include "constant_time_internal.h"
|
||||||
|
|
||||||
int mbedtls_mpi_mod_raw_cond_assign( mbedtls_mpi_uint *X,
|
void mbedtls_mpi_mod_raw_cond_assign( mbedtls_mpi_uint *X,
|
||||||
mbedtls_mpi_uint *Y,
|
mbedtls_mpi_uint *Y,
|
||||||
const mbedtls_mpi_mod_modulus *m,
|
const mbedtls_mpi_mod_modulus *m,
|
||||||
unsigned char assign )
|
unsigned char assign )
|
||||||
{
|
{
|
||||||
return mbedtls_mpi_core_cond_assign( X, m->limbs,
|
mbedtls_mpi_core_cond_assign( X, m->limbs,
|
||||||
Y, m->limbs, assign );
|
Y, m->limbs, assign );
|
||||||
}
|
}
|
||||||
|
|
||||||
int mbedtls_mpi_mod_raw_cond_swap( mbedtls_mpi_uint *X,
|
void mbedtls_mpi_mod_raw_cond_swap( mbedtls_mpi_uint *X,
|
||||||
mbedtls_mpi_uint *Y,
|
mbedtls_mpi_uint *Y,
|
||||||
const mbedtls_mpi_mod_modulus *m,
|
const mbedtls_mpi_mod_modulus *m,
|
||||||
unsigned char swap )
|
unsigned char swap )
|
||||||
{
|
{
|
||||||
return mbedtls_mpi_core_cond_swap( X, m->limbs,
|
mbedtls_mpi_core_cond_swap( X, m->limbs,
|
||||||
Y, m->limbs, swap );
|
Y, m->limbs, swap );
|
||||||
}
|
}
|
||||||
|
|
||||||
int mbedtls_mpi_mod_raw_read( mbedtls_mpi_uint *X,
|
int mbedtls_mpi_mod_raw_read( mbedtls_mpi_uint *X,
|
||||||
|
@ -51,16 +51,11 @@
|
|||||||
* \warning If \p assign is neither 0 nor 1, the result of this function
|
* \warning If \p assign is neither 0 nor 1, the result of this function
|
||||||
* is indeterminate, and the resulting value in \p X might be
|
* is indeterminate, and the resulting value in \p X might be
|
||||||
* neither its original value nor the value in \p Y.
|
* neither its original value nor the value in \p Y.
|
||||||
*
|
|
||||||
* \return \c 0 if successful.
|
|
||||||
* \return #MBEDTLS_ERR_MPI_BUFFER_TOO_SMALL if \p X isn't
|
|
||||||
* large enough to hold the value in \p Y.
|
|
||||||
* \return #MBEDTLS_ERR_MPI_BAD_INPUT_DATA if \p X or \p Y is invalid.
|
|
||||||
*/
|
*/
|
||||||
int mbedtls_mpi_mod_raw_cond_assign( mbedtls_mpi_uint *X,
|
void mbedtls_mpi_mod_raw_cond_assign( mbedtls_mpi_uint *X,
|
||||||
mbedtls_mpi_uint *Y,
|
mbedtls_mpi_uint *Y,
|
||||||
const mbedtls_mpi_mod_modulus *m,
|
const mbedtls_mpi_mod_modulus *m,
|
||||||
unsigned char assign );
|
unsigned char assign );
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Perform a safe conditional copy of MPI which doesn't reveal whether
|
* \brief Perform a safe conditional copy of MPI which doesn't reveal whether
|
||||||
@ -80,15 +75,11 @@ int mbedtls_mpi_mod_raw_cond_assign( mbedtls_mpi_uint *X,
|
|||||||
* \warning If \p swap is neither 0 nor 1, the result of this function
|
* \warning If \p swap is neither 0 nor 1, the result of this function
|
||||||
* is indeterminate, and both \p X and \p Y might end up with
|
* is indeterminate, and both \p X and \p Y might end up with
|
||||||
* values different to either of the original ones.
|
* values different to either of the original ones.
|
||||||
*
|
*/
|
||||||
* \return \c 0 if successful.
|
void mbedtls_mpi_mod_raw_cond_swap( mbedtls_mpi_uint *X,
|
||||||
* \return #MBEDTLS_ERR_MPI_BUFFER_TOO_SMALL if the size of
|
mbedtls_mpi_uint *Y,
|
||||||
* \p X and \p Y is differ.
|
const mbedtls_mpi_mod_modulus *m,
|
||||||
* \return #MBEDTLS_ERR_MPI_BAD_INPUT_DATA if \p X or \p Y is invalid.
|
unsigned char swap );
|
||||||
*/int mbedtls_mpi_mod_raw_cond_swap( mbedtls_mpi_uint *X,
|
|
||||||
mbedtls_mpi_uint *Y,
|
|
||||||
const mbedtls_mpi_mod_modulus *m,
|
|
||||||
unsigned char swap );
|
|
||||||
|
|
||||||
/** Import X from unsigned binary data.
|
/** Import X from unsigned binary data.
|
||||||
*
|
*
|
||||||
|
Loading…
x
Reference in New Issue
Block a user