mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-07-30 22:43:08 +03:00
Add ecjpake_zpk_read()
Not really tested yet
This commit is contained in:
@ -402,6 +402,22 @@ int mbedtls_ecp_is_zero( mbedtls_ecp_point *pt )
|
||||
return( mbedtls_mpi_cmp_int( &pt->Z, 0 ) == 0 );
|
||||
}
|
||||
|
||||
/*
|
||||
* Compare two points lazyly
|
||||
*/
|
||||
int mbedtls_ecp_point_cmp( const mbedtls_ecp_point *P,
|
||||
const mbedtls_ecp_point *Q )
|
||||
{
|
||||
if( mbedtls_mpi_cmp_mpi( &P->X, &Q->X ) == 0 &&
|
||||
mbedtls_mpi_cmp_mpi( &P->Y, &Q->Y ) == 0 &&
|
||||
mbedtls_mpi_cmp_mpi( &P->Z, &Q->Z ) == 0 )
|
||||
{
|
||||
return( 0 );
|
||||
}
|
||||
|
||||
return( MBEDTLS_ERR_ECP_BAD_INPUT_DATA );
|
||||
}
|
||||
|
||||
/*
|
||||
* Import a non-zero point from ASCII strings
|
||||
*/
|
||||
|
Reference in New Issue
Block a user