Skip to content

Commit 1e21270

Browse files
keithbuschaxboe
authored andcommitted
crypto: fix crc64 testmgr digest byte order
The result is set in little endian, so the expected digest needs to be consistent for big endian machines. Fixes: f3813f4 ("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]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jens Axboe <[email protected]>
1 parent 4020aad commit 1e21270

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

crypto/testmgr.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3686,11 +3686,11 @@ static const struct hash_testvec crc64_rocksoft_tv_template[] = {
36863686
{
36873687
.plaintext = zeroes,
36883688
.psize = 4096,
3689-
.digest = (u8 *)(u64[]){ 0x6482d367eb22b64eull },
3689+
.digest = "\x4e\xb6\x22\xeb\x67\xd3\x82\x64",
36903690
}, {
36913691
.plaintext = ones,
36923692
.psize = 4096,
3693-
.digest = (u8 *)(u64[]){ 0xc0ddba7302eca3acull },
3693+
.digest = "\xac\xa3\xec\x02\x73\xba\xdd\xc0",
36943694
}
36953695
};
36963696

0 commit comments

Comments
 (0)