lib: Add blake2s support for TKey USS derivation

The TKey User-Supplied Secret (USS) feature requires blake2s hashing
to derive app-specific secrets. Add blake2s implementation alongside
the existing blake2b support.

The blake2s implementation is ported from the reference BLAKE2
implementation at https://github.com/BLAKE2/BLAKE2

Co-developed-by: Claude <noreply@anthropic.com>
Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
Simon Glass
2025-10-19 03:00:25 +01:00
parent ec753ac734
commit 5a869f9523
3 changed files with 331 additions and 4 deletions

View File

@@ -79,7 +79,7 @@ obj-$(CONFIG_$(PHASE_)ACPI) += acpi/
obj-$(CONFIG_ECDSA) += ecdsa/
obj-$(CONFIG_$(PHASE_)RSA) += rsa/
obj-$(CONFIG_HASH) += hash-checksum.o
obj-$(CONFIG_BLAKE2) += blake2/blake2b.o
obj-$(CONFIG_BLAKE2) += blake2/blake2b.o blake2/blake2s.o
obj-$(CONFIG_$(PHASE_)MD5_LEGACY) += md5.o
obj-$(CONFIG_$(PHASE_)SHA1_LEGACY) += sha1.o