[PATCH v2 08/10] crypto: allwinner: add sun8i-ce ECDSA verifier
Simon Glass
sjg at chromium.org
Thu Jul 9 20:38:03 CEST 2026
On 2026-07-03T01:49:45, James Hilliard <james.hilliard1 at gmail.com> wrote:
> crypto: allwinner: add sun8i-ce ECDSA verifier
>
> The H616 Crypto Engine includes an ECC engine which can verify ECDSA
> signatures. Add a UCLASS_ECDSA child for the sun8i-ce parent so FIT
> signature verification can use the hardware block from U-Boot proper and
> SPL.
>
> The CE takes explicit curve parameters for each operation. Provide tables
> for the curves accepted by U-Boot's FIT ECDSA parser: secp224r1,
> prime256v1, secp384r1 and secp521r1. Make each curve independently
> selectable for U-Boot proper and SPL so SRAM-constrained builds can keep
> only the curves they need. The task input layout follows the ECC verify
> buffer order used by Allwinner's CE implementation.
>
> The CE input buffer uses fixed-width curve fields. Reuse the parameter
> packing logic for the message digest as well, so wider digests are
> truncated to the leftmost curve-width bytes according to ECDSA rules.
>
> Signed-off-by: James Hilliard <james.hilliard1 at gmail.com>
>
> drivers/crypto/allwinner/sun8i-ce/Kconfig | 93 +++++
> drivers/crypto/allwinner/sun8i-ce/Makefile | 1 +
> drivers/crypto/allwinner/sun8i-ce/sun8i-ce-core.c | 8 +
> drivers/crypto/allwinner/sun8i-ce/sun8i-ce-ecdsa.c | 434 +++++++++++++++++++++
> drivers/crypto/allwinner/sun8i-ce/sun8i-ce.h | 4 +
> 5 files changed, 540 insertions(+)
Not my area, but it looks OK so:
Reviewed-by: Simon Glass <sjg at chromium.org>
More information about the U-Boot
mailing list