ecp_curves: Adjusted input checking for ecp_mod_p255
.
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
This commit is contained in:
parent
d6beda7af9
commit
ec00b500b5
1 changed files with 1 additions and 3 deletions
|
@ -5432,9 +5432,7 @@ MBEDTLS_STATIC_TESTABLE
|
|||
int mbedtls_ecp_mod_p255_raw(mbedtls_mpi_uint *X, size_t X_Limbs)
|
||||
{
|
||||
|
||||
if (X_Limbs > 2*P255_WIDTH) {
|
||||
X_Limbs = 2*P255_WIDTH;
|
||||
} else if (X_Limbs < P255_WIDTH) {
|
||||
if (X_Limbs != 2 * P255_WIDTH) {
|
||||
return MBEDTLS_ERR_ECP_BAD_INPUT_DATA;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue