crypto: streebog - fix unaligned memory accesses
Don't cast the data buffer directly to streebog_uint512, as this
violates alignment rules.
Fixes: fe18957e8e
("crypto: streebog - add Streebog hash function")
Cc: Vitaly Chikunov <vt@altlinux.org>
Signed-off-by: Eric Biggers <ebiggers@google.com>
Reviewed-by: Vitaly Chikunov <vt@altlinux.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
This commit is contained in:
@@ -23,7 +23,10 @@ struct streebog_uint512 {
|
||||
};
|
||||
|
||||
struct streebog_state {
|
||||
u8 buffer[STREEBOG_BLOCK_SIZE];
|
||||
union {
|
||||
u8 buffer[STREEBOG_BLOCK_SIZE];
|
||||
struct streebog_uint512 m;
|
||||
};
|
||||
struct streebog_uint512 hash;
|
||||
struct streebog_uint512 h;
|
||||
struct streebog_uint512 N;
|
||||
|
Reference in New Issue
Block a user