crypto: ahash - Add virtual address support

This patch adds virtual address support to ahash.  Virtual addresses
were previously only supported through shash.  The user may choose
to use virtual addresses with ahash by calling ahash_request_set_virt
instead of ahash_request_set_crypt.

The API will take care of translating this to an SG list if necessary,
unless the algorithm declares that it supports chaining.  Therefore
in order for an ahash algorithm to support chaining, it must also
support virtual addresses directly.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
This commit is contained in:
Herbert Xu
2025-02-16 11:07:22 +08:00
parent c664f03417
commit 439963cdc3
4 changed files with 293 additions and 34 deletions

View File

@@ -126,7 +126,7 @@
*/
#define CRYPTO_ALG_FIPS_INTERNAL 0x00020000
/* Set if the algorithm supports request chains. */
/* Set if the algorithm supports request chains and virtual addresses. */
#define CRYPTO_ALG_REQ_CHAIN 0x00040000
/*