mbox series

[v4,00/11] crypto: Add partial block API and hmac to ahash

Message ID cover.1747288315.git.herbert@gondor.apana.org.au
Headers show
Series crypto: Add partial block API and hmac to ahash | expand

Message

Herbert Xu May 15, 2025, 5:54 a.m. UTC
v4 switches the name of the hmac shash and ahash instances.  The
ahash instance will bear the hmac name while shash gets the driver
name of hmac-shash.  Add patch to silence testmgr warning on -17
for shash allocations as it is expected.

This series adds partial block handling to ahash so that drivers
do not have to handle them.  It also adds hmac ahash support so
that drivers that do hmac purely in software can be simplified.

A new test has been added to testmgr to ensure that all implementations
of a given algorithm use the same export format.  As a transitional
measure only algorithms that declare themselves as block-only, or
provides export_core/import_core hooks will be tested.

Herbert Xu (11):
  crypto: hash - Move core export and import into internel/hash.h
  crypto: hash - Add export_core and import_core hooks
  crypto: ahash - Handle partial blocks in API
  crypto: hmac - Zero shash desc in setkey
  crypto: hmac - Add export_core and import_core
  crypto: shash - Set reqsize in shash_alg
  crypto: algapi - Add driver template support to crypto_inst_setname
  crypto: testmgr - Ignore EEXIST on shash allocation
  crypto: hmac - Add ahash support
  crypto: testmgr - Use ahash for generic tfm
  crypto: testmgr - Add hash export format testing

 crypto/ahash.c                 | 572 ++++++++++++++++-----------------
 crypto/algapi.c                |   8 +-
 crypto/hmac.c                  | 392 +++++++++++++++++++---
 crypto/shash.c                 |  46 ++-
 crypto/testmgr.c               | 134 ++++++--
 crypto/testmgr.h               |   2 +
 include/crypto/algapi.h        |  12 +-
 include/crypto/hash.h          |  73 ++---
 include/crypto/internal/hash.h |  66 ++++
 9 files changed, 883 insertions(+), 422 deletions(-)