mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-03-29 22:20:30 +00:00
psa_util: add support for rfc8410's OIDs
Signed-off-by: valerio <valerio.setti@nordicsemi.no>
This commit is contained in:
parent
a87601dc11
commit
64e0184a39
@ -248,6 +248,22 @@ static inline int mbedtls_psa_get_ecc_oid_from_id(
|
|||||||
#endif /* MBEDTLS_ECP_DP_BP512R1_ENABLED */
|
#endif /* MBEDTLS_ECP_DP_BP512R1_ENABLED */
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case PSA_ECC_FAMILY_MONTGOMERY:
|
||||||
|
switch (bits) {
|
||||||
|
#if defined(MBEDTLS_ECP_DP_CURVE25519_ENABLED)
|
||||||
|
case 255:
|
||||||
|
*oid = MBEDTLS_OID_X25519;
|
||||||
|
*oid_len = MBEDTLS_OID_SIZE(MBEDTLS_OID_X25519);
|
||||||
|
return 0;
|
||||||
|
#endif /* MBEDTLS_ECP_DP_CURVE25519_ENABLED */
|
||||||
|
#if defined(MBEDTLS_ECP_DP_CURVE448_ENABLED)
|
||||||
|
case 448:
|
||||||
|
*oid = MBEDTLS_OID_X448;
|
||||||
|
*oid_len = MBEDTLS_OID_SIZE(MBEDTLS_OID_X448);
|
||||||
|
return 0;
|
||||||
|
#endif /* MBEDTLS_ECP_DP_CURVE448_ENABLED */
|
||||||
|
}
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
(void) oid;
|
(void) oid;
|
||||||
(void) oid_len;
|
(void) oid_len;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user