linux/Documentation/crypto
Eric Biggers c626910f3f crypto: ahash - remove support for nonzero alignmask
Currently, the ahash API checks the alignment of all key and result
buffers against the algorithm's declared alignmask, and for any
unaligned buffers it falls back to manually aligned temporary buffers.

This is virtually useless, however.  First, since it does not apply to
the message, its effect is much more limited than e.g. is the case for
the alignmask for "skcipher".  Second, the key and result buffers are
given as virtual addresses and cannot (in general) be DMA'ed into, so
drivers end up having to copy to/from them in software anyway.  As a
result it's easy to use memcpy() or the unaligned access helpers.

The crypto_hash_walk_*() helper functions do use the alignmask to align
the message.  But with one exception those are only used for shash
algorithms being exposed via the ahash API, not for native ahashes, and
aligning the message is not required in this case, especially now that
alignmask support has been removed from shash.  The exception is the
n2_core driver, which doesn't set an alignmask.

In any case, no ahash algorithms actually set a nonzero alignmask
anymore.  Therefore, remove support for it from ahash.  The benefit is
that all the code to handle "misaligned" buffers in the ahash API goes
away, reducing the overhead of the ahash API.

This follows the same change that was made to shash.

Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2023-10-27 18:04:29 +08:00
..
api-aead.rst
api-akcipher.rst
api-digest.rst
api-intro.rst It's been a busy cycle for documentation - hopefully the busiest for a 2020-08-04 22:47:54 -07:00
api-kpp.rst
api-rng.rst
api-samples.rst
api-skcipher.rst crypto: remove cipher routines from public crypto API 2021-01-03 08:41:35 +11:00
api.rst
architecture.rst
asymmetric-keys.rst
async-tx-api.rst docs: crypto: async-tx-api: fix typo in struct name 2023-06-09 01:59:30 -06:00
crypto_engine.rst crypto: engine - Add KPP Support to Crypto Engine 2021-10-29 21:04:03 +08:00
descore-readme.rst docs: crypto: descore-readme.txt: convert to ReST format 2020-06-19 14:05:22 -06:00
devel-algos.rst crypto: ahash - remove support for nonzero alignmask 2023-10-27 18:04:29 +08:00
index.rst Docs/subsystem-apis: Remove '[The ]Linux' prefixes from titles of listed documents 2023-01-24 15:27:08 -07:00
intro.rst
userspace-if.rst crypto: af_alg - Support symmetric encryption via keyring keys 2022-10-28 12:36:34 +08:00