Change ecp_mul() prototype to allow randomization
(Also improve an error code while at it.)
This commit is contained in:
parent
f451bac000
commit
e09d2f8261
10 changed files with 99 additions and 37 deletions
|
@ -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 ) )
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue