mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2024-11-22 16:45:41 +01:00
Rm obsolete comment
Refers to ecp_mul() while we're now calling ecp_muladd(). Wrap long lines while at it.
This commit is contained in:
parent
a7937f9967
commit
411079fc34
@ -205,7 +205,8 @@ int mbedtls_ecdsa_verify( mbedtls_ecp_group *grp,
|
|||||||
mbedtls_ecp_point R;
|
mbedtls_ecp_point R;
|
||||||
|
|
||||||
mbedtls_ecp_point_init( &R );
|
mbedtls_ecp_point_init( &R );
|
||||||
mbedtls_mpi_init( &e ); mbedtls_mpi_init( &s_inv ); mbedtls_mpi_init( &u1 ); mbedtls_mpi_init( &u2 );
|
mbedtls_mpi_init( &e ); mbedtls_mpi_init( &s_inv );
|
||||||
|
mbedtls_mpi_init( &u1 ); mbedtls_mpi_init( &u2 );
|
||||||
|
|
||||||
/* Fail cleanly on curves such as Curve25519 that can't be used for ECDSA */
|
/* Fail cleanly on curves such as Curve25519 that can't be used for ECDSA */
|
||||||
if( grp->N.p == NULL )
|
if( grp->N.p == NULL )
|
||||||
@ -244,9 +245,6 @@ int mbedtls_ecdsa_verify( mbedtls_ecp_group *grp,
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* Step 5: R = u1 G + u2 Q
|
* Step 5: R = u1 G + u2 Q
|
||||||
*
|
|
||||||
* Since we're not using any secret data, no need to pass a RNG to
|
|
||||||
* mbedtls_ecp_mul() for countermesures.
|
|
||||||
*/
|
*/
|
||||||
MBEDTLS_MPI_CHK( mbedtls_ecp_muladd( grp, &R, &u1, &grp->G, &u2, Q ) );
|
MBEDTLS_MPI_CHK( mbedtls_ecp_muladd( grp, &R, &u1, &grp->G, &u2, Q ) );
|
||||||
|
|
||||||
@ -273,7 +271,8 @@ int mbedtls_ecdsa_verify( mbedtls_ecp_group *grp,
|
|||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
mbedtls_ecp_point_free( &R );
|
mbedtls_ecp_point_free( &R );
|
||||||
mbedtls_mpi_free( &e ); mbedtls_mpi_free( &s_inv ); mbedtls_mpi_free( &u1 ); mbedtls_mpi_free( &u2 );
|
mbedtls_mpi_free( &e ); mbedtls_mpi_free( &s_inv );
|
||||||
|
mbedtls_mpi_free( &u1 ); mbedtls_mpi_free( &u2 );
|
||||||
|
|
||||||
return( ret );
|
return( ret );
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user