Fix check in p25519 quasi-reduction

Signed-off-by: Hanno Becker <hanno.becker@arm.com>
This commit is contained in:
Hanno Becker 2022-04-12 11:18:11 +01:00
parent d830feb256
commit bb04cb992f

View File

@ -5223,7 +5223,7 @@ static int ecp_mod_p255( mbedtls_mpi *N )
/* Helper references for top part of N */
mbedtls_mpi_uint * const NT_p = N->p + P255_WIDTH;
const size_t NT_n = N->n - P255_WIDTH;
if( NT_n <= P255_WIDTH )
if( N->n <= P255_WIDTH )
return( 0 );
/* Split N as N + 2^256 M */