mirror of
https://github.com/cuberite/polarssl.git
synced 2025-09-30 17:09:41 -04:00
bignum_core: Removed input checking for mbedtls_mpi_core_shift_l
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
This commit is contained in:
parent
c787cf73b3
commit
b89440394f
@ -362,11 +362,6 @@ void mbedtls_mpi_core_shift_l(mbedtls_mpi_uint *X, size_t limbs,
|
|||||||
v0 = count / (biL);
|
v0 = count / (biL);
|
||||||
v1 = count & (biL - 1);
|
v1 = count & (biL - 1);
|
||||||
|
|
||||||
if (v0 > limbs || (v0 == limbs && v1 > 0)) {
|
|
||||||
memset(X, 0, limbs * ciL);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* shift by count / limb_size
|
* shift by count / limb_size
|
||||||
*/
|
*/
|
||||||
|
@ -297,7 +297,7 @@ void mbedtls_mpi_core_shift_r(mbedtls_mpi_uint *X, size_t limbs,
|
|||||||
* \brief Shift an MPI in-place left by a number of bits.
|
* \brief Shift an MPI in-place left by a number of bits.
|
||||||
*
|
*
|
||||||
* Shifting by more bits than there are bit positions
|
* Shifting by more bits than there are bit positions
|
||||||
* in \p X is valid and results in setting \p X to 0.
|
* in \p X will produce an unspecified result.
|
||||||
*
|
*
|
||||||
* This function's execution time depends on the value
|
* This function's execution time depends on the value
|
||||||
* of \p count (and of course \p limbs).
|
* of \p count (and of course \p limbs).
|
||||||
|
Loading…
x
Reference in New Issue
Block a user