summaryrefslogtreecommitdiff
path: root/crypto/crct10dif_common.c
diff options
context:
space:
mode:
authorEric Biggers <ebiggers@google.com>2017-11-22 11:51:39 -0800
committerHerbert Xu <herbert@gondor.apana.org.au>2017-11-29 17:33:33 +1100
commit49b79ef83e36c996759ef5ca4df9eda80d8d549e (patch)
treecb511e3651e6ff0a3445d10cdbbe48fc6ae6d7d9 /crypto/crct10dif_common.c
parent6c76177611511a8be879eb44cd801c994eb3a717 (diff)
downloadlinux-crypto-49b79ef83e36c996759ef5ca4df9eda80d8d549e.tar.gz
linux-crypto-49b79ef83e36c996759ef5ca4df9eda80d8d549e.zip
crypto: chacha20 - Fix keystream alignment for chacha20_block()
When chacha20_block() outputs the keystream block, it uses 'u32' stores directly. However, the callers (crypto/chacha20_generic.c and drivers/char/random.c) declare the keystream buffer as a 'u8' array, which is not guaranteed to have the needed alignment. Fix it by having both callers declare the keystream as a 'u32' array. For now this is preferable to switching over to the unaligned access macros because chacha20_block() is only being used in cases where we can easily control the alignment (stack buffers). Signed-off-by: Eric Biggers <ebiggers@google.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'crypto/crct10dif_common.c')
0 files changed, 0 insertions, 0 deletions