diff --git a/library/bignum_core.c b/library/bignum_core.c index 92a9d558a3..34223ee957 100644 --- a/library/bignum_core.c +++ b/library/bignum_core.c @@ -362,11 +362,6 @@ void mbedtls_mpi_core_shift_l(mbedtls_mpi_uint *X, size_t limbs, v0 = count / (biL); v1 = count & (biL - 1); - if (v0 > limbs || (v0 == limbs && v1 > 0)) { - memset(X, 0, limbs * ciL); - return; - } - /* * shift by count / limb_size */ diff --git a/library/bignum_core.h b/library/bignum_core.h index 2b11ccaff3..f7194982dc 100644 --- a/library/bignum_core.h +++ b/library/bignum_core.h @@ -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. * * 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 * of \p count (and of course \p limbs).