mirror of
https://github.com/yuzu-emu/mbedtls
synced 2024-11-25 02:48:10 +00:00
Fix possible issue in corner-case for ecp_mul_mx()
This commit is contained in:
parent
7a949d3f5b
commit
93f41dbdfd
1 changed files with 3 additions and 0 deletions
|
@ -1540,6 +1540,9 @@ static int ecp_mul_mxz( ecp_group *grp, ecp_point *R,
|
|||
MPI_CHK( mpi_lset( &R->Z, 0 ) );
|
||||
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 */
|
||||
if( f_rng != NULL )
|
||||
MPI_CHK( ecp_randomize_mxz( grp, &RP, f_rng, p_rng ) );
|
||||
|
|
Loading…
Reference in a new issue