mirror of
https://git.suyu.dev/suyu/mbedtls.git
synced 2025-12-24 00:06:32 +01:00
Some operations are not supported with Curve25519
This commit is contained in:
parent
3d7053a2bb
commit
97871ef236
3 changed files with 20 additions and 0 deletions
|
|
@ -946,6 +946,9 @@ int ecp_add( const ecp_group *grp, ecp_point *R,
|
|||
{
|
||||
int ret;
|
||||
|
||||
if( ecp_is_montgomery( grp ) )
|
||||
return( POLARSSL_ERR_ECP_FEATURE_UNAVAILABLE );
|
||||
|
||||
MPI_CHK( ecp_add_mixed( grp, R, P, Q ) );
|
||||
MPI_CHK( ecp_normalize_jac( grp, R ) );
|
||||
|
||||
|
|
@ -965,6 +968,9 @@ int ecp_sub( const ecp_group *grp, ecp_point *R,
|
|||
|
||||
ecp_point_init( &mQ );
|
||||
|
||||
if( ecp_is_montgomery( grp ) )
|
||||
return( POLARSSL_ERR_ECP_FEATURE_UNAVAILABLE );
|
||||
|
||||
/* mQ = - Q */
|
||||
ecp_copy( &mQ, Q );
|
||||
if( mpi_cmp_int( &mQ.Y, 0 ) != 0 )
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue