diff options
| author | Eric Biggers <[email protected]> | 2025-07-11 21:58:43 +0000 |
|---|---|---|
| committer | Eric Biggers <[email protected]> | 2025-07-14 15:20:37 +0000 |
| commit | 7941ad696506917fa6228f44be2df0c2f0909a62 (patch) | |
| tree | 615fc21f7dea8b8ea5b975bc522fa1f72950c513 /lib/parser.c | |
| parent | lib/crypto: arm/poly1305: Remove unneeded empty weak function (diff) | |
| download | kernel-7941ad696506917fa6228f44be2df0c2f0909a62.tar.gz kernel-7941ad696506917fa6228f44be2df0c2f0909a62.zip | |
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 <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Eric Biggers <[email protected]>
Diffstat (limited to 'lib/parser.c')
0 files changed, 0 insertions, 0 deletions
