]> git.baikalelectronics.ru Git - kernel.git/commit
crypto: twofish - use unaligned accessors instead of alignmask
authorArd Biesheuvel <ardb@kernel.org>
Mon, 1 Feb 2021 18:02:37 +0000 (19:02 +0100)
committerHerbert Xu <herbert@gondor.apana.org.au>
Wed, 10 Feb 2021 06:55:57 +0000 (17:55 +1100)
commit6dbbbff69063e880a3b24b4f4ad33e654fa0fbff
tree1d4b6177db8d7bb8458d4da3be6da94a527c8eec
parent8dd18cec6f531256cc9e0791417fd0d1941aa1a4
crypto: twofish - use unaligned accessors instead of alignmask

Instead of using an alignmask of 0x3 to ensure 32-bit alignment of the
Twofish input and output blocks, which propagates to mode drivers, and
results in pointless copying on architectures that don't care about
alignment, use the unaligned accessors, which will do the right thing on
each respective architecture, avoiding the need for double buffering.

Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
crypto/twofish_generic.c