Fix check in p25519 quasi-reduction
Signed-off-by: Hanno Becker <hanno.becker@arm.com>
This commit is contained in:
parent
d830feb256
commit
bb04cb992f
@ -5223,7 +5223,7 @@ static int ecp_mod_p255( mbedtls_mpi *N )
|
|||||||
/* Helper references for top part of N */
|
/* Helper references for top part of N */
|
||||||
mbedtls_mpi_uint * const NT_p = N->p + P255_WIDTH;
|
mbedtls_mpi_uint * const NT_p = N->p + P255_WIDTH;
|
||||||
const size_t NT_n = N->n - P255_WIDTH;
|
const size_t NT_n = N->n - P255_WIDTH;
|
||||||
if( NT_n <= P255_WIDTH )
|
if( N->n <= P255_WIDTH )
|
||||||
return( 0 );
|
return( 0 );
|
||||||
|
|
||||||
/* Split N as N + 2^256 M */
|
/* Split N as N + 2^256 M */
|
||||||
|
Loading…
Reference in New Issue
Block a user