vmac test fails on s390

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

Jan 14 14:47:38 h42lp52 kernel: alg: hash: Test 1 failed for vmac(aes-s390)
Jan 14 14:47:38 h42lp52 kernel: 00000000: e7 79 33 b7 fd 8a d7 cb

Looking at the digest from the failing test vector:

.digest = "\xcb\xd7\x8a\xfd\xb7\x33\x79\xe7",

the output looks somehow familiar... Maybe a missing endian conversion?
The patch fixes the test for me but it is just a wild guess and maybe
it should be done at another place?

Jan

diff --git a/crypto/vmac.c b/crypto/vmac.c
index 0a9468e..0e23dfb 100644
--- a/crypto/vmac.c
+++ b/crypto/vmac.c
@@ -359,7 +359,7 @@ static u64 l3hash(u64 p1, u64 p2,
 	rl += t;
 	rl += (0 - (rl < t)) & 257;
 	rl += (0 - (rl > p64-1)) & 257;
-	return rl;
+	return le64_to_cpup(&rl);
 }
 
 static void vhash_update(const unsigned char *m,


--
To unsubscribe from this list: send the line "unsubscribe linux-crypto" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel]     [Gnu Classpath]     [Gnu Crypto]     [DM Crypt]     [Netfilter]     [Bugtraq]

  Powered by Linux