diff options
author | Eric Biggers <ebiggers@kernel.org> | 2025-07-11 14:58:43 -0700 |
---|---|---|
committer | Eric Biggers <ebiggers@kernel.org> | 2025-07-14 08:20:37 -0700 |
commit | 7941ad696506917fa6228f44be2df0c2f0909a62 (patch) | |
tree | 615fc21f7dea8b8ea5b975bc522fa1f72950c513 /scripts/lib/kdoc/kdoc_files.py | |
parent | 6e07c5e166597de1d7943ecf2539cad18c0e2ce1 (diff) |
lib/crypto: sha2: Add hmac_sha*_init_usingrawkey()
While the HMAC library functions support both incremental and one-shot
computation and both prepared and raw keys, the combination of raw key
+ incremental was missing. It turns out that several potential users of
the HMAC library functions (tpm2-sessions.c, smb2transport.c,
trusted_tpm1.c) want exactly that.
Therefore, add the missing functions hmac_sha*_init_usingrawkey().
Implement them in an optimized way that directly initializes the HMAC
context without a separate key preparation step.
Reimplement the one-shot raw key functions hmac_sha*_usingrawkey() on
top of the new functions, which makes them a bit more efficient.
Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
Link: https://lore.kernel.org/r/20250711215844.41715-1-ebiggers@kernel.org
Signed-off-by: Eric Biggers <ebiggers@kernel.org>
Diffstat (limited to 'scripts/lib/kdoc/kdoc_files.py')
0 files changed, 0 insertions, 0 deletions