1
0
mirror of https://github.com/Mbed-TLS/mbedtls.git synced 2025-08-08 17:42:09 +03:00

psa: let mbedtls_ecc_group_from_psa() accept only exact bit lengths

Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
This commit is contained in:
Valerio Setti
2023-12-29 11:46:44 +01:00
parent dc33200b74
commit 0e608807e3
3 changed files with 17 additions and 24 deletions

View File

@@ -276,7 +276,6 @@ mbedtls_ecp_group_id mbedtls_ecc_group_from_psa(psa_ecc_family_t curve,
#endif
#if defined(PSA_WANT_ECC_SECP_R1_521)
case 521:
case 528:
return MBEDTLS_ECP_DP_SECP521R1;
#endif
}
@@ -303,7 +302,6 @@ mbedtls_ecp_group_id mbedtls_ecc_group_from_psa(psa_ecc_family_t curve,
switch (bits) {
#if defined(PSA_WANT_ECC_MONTGOMERY_255)
case 255:
case 256:
return MBEDTLS_ECP_DP_CURVE25519;
#endif
#if defined(PSA_WANT_ECC_MONTGOMERY_448)