crytpo: fix crc64 testmgr digest byte order
Subsystems (3)
PATCH 1/1 crytpo: fix crc64 testmgr digest byte order
From: Keith Busch <[email protected]>
The result is set in little endian, so the expected digest needs to be consistent for big endian machines.
Fixes commit f3813f4b287e4 ("crypto: add rocksoft 64b crc guard tag framework")
Reported-by Vasily Gorbik <[email protected]>
Reported-by Corentin Labbe <[email protected]>
Signed-off-by Keith Busch <[email protected]>
--- crypto/testmgr.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
crypto/testmgr.h +2 -2
@@ -3686,11 +3686,11 @@ static const struct hash_testvec crc64_rocksoft_tv_template[] = { { .plaintext = zeroes, .psize = 4096, - .digest = (u8 *)(u64[]){ 0x6482d367eb22b64eull }, + .digest = "\x4e\xb6\x22\xeb\x67\xd3\x82\x64", }, { .plaintext = ones, .psize = 4096, - .digest = (u8 *)(u64[]){ 0xc0ddba7302eca3acull }, + .digest = "\xac\xa3\xec\x02\x73\xba\xdd\xc0", } };
Signature · 1 line
2.17.2
Quoted 6 lines · On Tue, 22 Mar 2022 08:21:07 -0600, [email protected] wrote:
From: Keith Busch <[email protected]>
The result is set in little endian, so the expected digest needs to be consistent for big endian machines.
Applied, thanks!
[1/1] crytpo: fix crc64 testmgr digest byte order
commit: c30cf83999ad58135fa01fbf9f2b15ce15b5cc4a
Best regards,
Signature · 1 line
Jens Axboe