diff options
author | Jamin Lin <jamin_lin@aspeedtech.com> | 2025-06-06 15:34:21 +0800 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2025-06-25 13:45:38 -0600 |
commit | ed51f3e446f2ee9e2fa6577388451a93122b6551 (patch) | |
tree | 59096e52ed66223451cacac4bbb1e50ca18310a3 /lib/linux_string.c | |
parent | e18472f1dee609b2ee8a492985bf77a5012e4d01 (diff) |
lib: ecdsa: Add support for loading ECDSA public key from FDT
This patch adds support for parsing ECDSA public keys from the device tree
blob (FDT) under the `/signature` node. The public key is expected to be
defined using:
- ecdsa,curve (e.g., "prime256v1", "secp384r1")
- ecdsa,x-point
- ecdsa,y-point
The implementation introduces:
- struct ecdsa_public_key to hold parsed key fields
- fdt_get_key() to parse the curve and coordinates from the FDT
- read_key_from_fdt() to convert the parsed values into an OpenSSL EC_KEY
- load_key_from_fdt() to support loading keys using required_keynode,
keyname hint, or fallback to scanning all subnodes under "/signature".
If "info->fdt_blob" is provided, the key is loaded from the FDT. Otherwise,
the code falls back to loading a PEM-formatted key from file as before.
This allows for ECDSA signature verification where the public key is
embedded in the FIT image device tree, useful for systems that require
signature validation without external files.
Signed-off-by: Jamin Lin <jamin_lin@aspeedtech.com>
Diffstat (limited to 'lib/linux_string.c')
0 files changed, 0 insertions, 0 deletions