diff --git a/ChangeLog.d/psa_generate_key-curve25519.txt b/ChangeLog.d/psa_generate_key-curve25519.txt new file mode 100644 index 000000000..24b6fcfe2 --- /dev/null +++ b/ChangeLog.d/psa_generate_key-curve25519.txt @@ -0,0 +1,3 @@ +Bugfix + * Fix psa_generate_key() returning an error when asked to generate + an ECC key pair on Curve25519 or secp244k1. diff --git a/library/psa_crypto.c b/library/psa_crypto.c index 931e2e915..3182a0acf 100644 --- a/library/psa_crypto.c +++ b/library/psa_crypto.c @@ -6110,8 +6110,6 @@ static psa_status_t psa_generate_key_internal( return( PSA_ERROR_NOT_SUPPORTED ); if( grp_id == MBEDTLS_ECP_DP_NONE || curve_info == NULL ) return( PSA_ERROR_NOT_SUPPORTED ); - if( curve_info->bit_size != bits ) - return( PSA_ERROR_INVALID_ARGUMENT ); mbedtls_ecp_keypair_init( &ecp ); ret = mbedtls_ecp_gen_key( grp_id, &ecp, mbedtls_ctr_drbg_random,