summaryrefslogtreecommitdiff
path: root/crypto/tcrypt.h
diff options
context:
space:
mode:
authorEric Biggers <ebiggers@google.com>2023-10-18 22:53:37 -0700
committerHerbert Xu <herbert@gondor.apana.org.au>2023-10-27 18:04:25 +0800
commitc4221113bcc6709e52df1599cd846186b067f091 (patch)
tree7320b5f9e6195810b97314aef9f27778b8a12929 /crypto/tcrypt.h
parent177bcadde839a36c00efc517d17e74ccae578e36 (diff)
downloadlinux-crypto-c4221113bcc6709e52df1599cd846186b067f091.tar.gz
linux-crypto-c4221113bcc6709e52df1599cd846186b067f091.zip
crypto: shash - remove support for nonzero alignmask
Currently, the shash API checks the alignment of all message, key, and digest 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. In the case of the message buffer, cryptographic hash functions internally operate on fixed-size blocks, so implementations end up needing to deal with byte-aligned data anyway because the length(s) passed to ->update might not be divisible by the block size. Word-alignment of the message can theoretically be helpful for CRCs, like what was being done in crc32c-sparc64. But in practice it's better for the algorithms to use unaligned accesses or align the message themselves. A similar argument applies to the key and digest. In any case, no shash algorithms actually set a nonzero alignmask anymore. Therefore, remove support for it from shash. The benefit is that all the code to handle "misaligned" buffers in the shash API goes away, reducing the overhead of the shash API. Signed-off-by: Eric Biggers <ebiggers@google.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to '')
0 files changed, 0 insertions, 0 deletions