1
0
mirror of https://github.com/Mbed-TLS/mbedtls.git synced 2025-07-30 22:43:08 +03:00

psa_crypto_ecp: return unsupported for secp224k1 in check_ecc_parameters()

Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
This commit is contained in:
Valerio Setti
2024-01-04 10:58:36 +01:00
parent ac73952474
commit 65df79303f

View File

@ -77,14 +77,14 @@ static int check_ecc_parameters(psa_ecc_family_t family, size_t *bits)
case PSA_ECC_FAMILY_SECP_K1: case PSA_ECC_FAMILY_SECP_K1:
switch (*bits) { switch (*bits) {
case 192: case 192:
case 224:
case 256: case 256:
return PSA_SUCCESS; return PSA_SUCCESS;
/* secp224k1 has 224-bit coordinates but 225-bit private keys. /* secp224k1 is not and will not be supported in PSA (#3541).
* This means that private keys are represented with 232 bits. */ * Note: secp224k1 has 225-bit private keys which are rounded
* up to 232 for their representation. */
case 224:
case 232: case 232:
*bits = 225; return PSA_ERROR_NOT_SUPPORTED;
return PSA_SUCCESS;
} }
break; break;
} }