summaryrefslogtreecommitdiff
path: root/crypto/tea.c
diff options
context:
space:
mode:
authorEric Biggers <ebiggers@google.com>2017-11-22 11:51:36 -0800
committerHerbert Xu <herbert@gondor.apana.org.au>2017-11-29 17:33:32 +1100
commit20ac3c0c1439ffc5f324b8a45b9b627fa60c9ad4 (patch)
tree5d3dd593aa935019e0e8fd032668e15778352e0c /crypto/tea.c
parentb71bca3c84a81228f89a07a2fc0295cab7361b00 (diff)
downloadlinux-crypto-20ac3c0c1439ffc5f324b8a45b9b627fa60c9ad4.tar.gz
linux-crypto-20ac3c0c1439ffc5f324b8a45b9b627fa60c9ad4.zip
crypto: chacha20 - Use unaligned access macros when loading key and IV
The generic ChaCha20 implementation has a cra_alignmask of 3, which ensures that the key passed into crypto_chacha20_setkey() and the IV passed into crypto_chacha20_init() are 4-byte aligned. However, these functions are also called from the ARM and ARM64 implementations of ChaCha20, which intentionally do not have a cra_alignmask set. This is broken because 32-bit words are being loaded from potentially-unaligned buffers without the unaligned access macros. Fix it by using the unaligned access macros when loading the key and IV. Signed-off-by: Eric Biggers <ebiggers@google.com> Acked-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to '')
0 files changed, 0 insertions, 0 deletions