Files
Jonathan Hui f231ab340a [crypto] use mbedtls HKDF and ECP public key export APIs (#13918)
Enable `MBEDTLS_HKDF_C` in `third_party/mbedtls/mbedtls-config.h` and
update `otPlatCryptoHkdfExtract()` and `otPlatCryptoHkdfExpand()` to
use `mbedtls_hkdf_extract()` and `mbedtls_hkdf_expand()` when
`MBEDTLS_HKDF_C` is defined, while keeping the `HmacSha256`-based
implementation as a `#else` fallback for custom Mbed TLS configs. Also
validate HKDF arguments, including the RFC 5869 output length limit.

Update `otPlatCryptoEcdsaGetPublicKey()` to export the uncompressed
P-256 public key via `mbedtls_ecp_write_public_key()` on Mbed TLS 3.6
and later instead of accessing private `mbedtls_ecp_point` fields
directly, while retaining the `< 3.6` fallback.

Expand `test_hkdf_sha256` and `test_ecdsa` unit test coverage for empty
inputs, repeated expansion, RFC 5869 output bounds, and invalid inputs.
2026-11-11 17:15:34 -08:00
..
2023-06-28 08:54:23 -07:00