mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2024-11-23 00:05:51 +01:00
Test the new deterministic ECDSA function
This commit is contained in:
parent
2934c32da2
commit
e552a826fd
@ -129,6 +129,16 @@ void ecdsa_det_test_vectors( int id, char *d_str, int md_alg,
|
||||
TEST_ASSERT( mbedtls_mpi_cmp_mpi( &r, &r_check ) == 0 );
|
||||
TEST_ASSERT( mbedtls_mpi_cmp_mpi( &s, &s_check ) == 0 );
|
||||
|
||||
mbedtls_mpi_free( &r ); mbedtls_mpi_free( &s );
|
||||
mbedtls_mpi_init( &r ); mbedtls_mpi_init( &s );
|
||||
|
||||
TEST_ASSERT(
|
||||
mbedtls_ecdsa_sign_det_ext( &grp, &r, &s, &d, hash, hlen,
|
||||
md_alg, rnd_std_rand, NULL )
|
||||
== 0 );
|
||||
|
||||
TEST_ASSERT( mbedtls_mpi_cmp_mpi( &r, &r_check ) == 0 );
|
||||
TEST_ASSERT( mbedtls_mpi_cmp_mpi( &s, &s_check ) == 0 );
|
||||
exit:
|
||||
mbedtls_ecp_group_free( &grp );
|
||||
mbedtls_mpi_free( &d ); mbedtls_mpi_free( &r ); mbedtls_mpi_free( &s );
|
||||
|
Loading…
Reference in New Issue
Block a user