mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-07-28 00:21:48 +03:00
ECDH: Enable Everest Curve25519 in ECDH/ECDSA/ECP
This commit is contained in:
committed by
Janos Follath
parent
696dedaed6
commit
c9f737b4ba
@ -263,8 +263,10 @@ static int ecdsa_sign_restartable( mbedtls_ecp_group *grp,
|
||||
mbedtls_mpi *pk = &k, *pr = r;
|
||||
|
||||
/* Fail cleanly on curves such as Curve25519 that can't be used for ECDSA */
|
||||
if( grp->N.p == NULL )
|
||||
return( MBEDTLS_ERR_ECP_BAD_INPUT_DATA );
|
||||
if( grp->id == MBEDTLS_ECP_DP_CURVE25519 ||
|
||||
grp->id == MBEDTLS_ECP_DP_CURVE448 ||
|
||||
grp->N.p == NULL )
|
||||
return( MBEDTLS_ERR_MD_FEATURE_UNAVAILABLE );
|
||||
|
||||
/* Make sure d is in range 1..n-1 */
|
||||
if( mbedtls_mpi_cmp_int( d, 1 ) < 0 || mbedtls_mpi_cmp_mpi( d, &grp->N ) >= 0 )
|
||||
|
Reference in New Issue
Block a user