mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-07-28 00:21:48 +03:00
Change ecp_mul() prototype to allow randomization
(Also improve an error code while at it.)
This commit is contained in:
@ -161,9 +161,12 @@ int ecdsa_verify( const ecp_group *grp,
|
||||
|
||||
/*
|
||||
* Step 5: R = u1 G + u2 Q
|
||||
*
|
||||
* Since we're not using any secret data, no need to pass a RNG to
|
||||
* ecp_mul() for countermesures.
|
||||
*/
|
||||
MPI_CHK( ecp_mul( grp, &R, &u1, &grp->G ) );
|
||||
MPI_CHK( ecp_mul( grp, &P, &u2, Q ) );
|
||||
MPI_CHK( ecp_mul( grp, &R, &u1, &grp->G, NULL, NULL ) );
|
||||
MPI_CHK( ecp_mul( grp, &P, &u2, Q, NULL, NULL ) );
|
||||
MPI_CHK( ecp_add( grp, &R, &R, &P ) );
|
||||
|
||||
if( ecp_is_zero( &R ) )
|
||||
|
Reference in New Issue
Block a user