mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2024-11-22 17:25:37 +01:00
Fix possible issue in corner-case for ecp_mul_mx()
This commit is contained in:
parent
7a949d3f5b
commit
93f41dbdfd
@ -1540,6 +1540,9 @@ static int ecp_mul_mxz( ecp_group *grp, ecp_point *R,
|
|||||||
MPI_CHK( mpi_lset( &R->Z, 0 ) );
|
MPI_CHK( mpi_lset( &R->Z, 0 ) );
|
||||||
mpi_free( &R->Y );
|
mpi_free( &R->Y );
|
||||||
|
|
||||||
|
/* RP.X might be sligtly larger than P, so reduce it */
|
||||||
|
MOD_ADD( RP.X );
|
||||||
|
|
||||||
/* Randomize coordinates of the starting point */
|
/* Randomize coordinates of the starting point */
|
||||||
if( f_rng != NULL )
|
if( f_rng != NULL )
|
||||||
MPI_CHK( ecp_randomize_mxz( grp, &RP, f_rng, p_rng ) );
|
MPI_CHK( ecp_randomize_mxz( grp, &RP, f_rng, p_rng ) );
|
||||||
|
Loading…
Reference in New Issue
Block a user