Linux cryptographic layer development
 help / color / mirror / Atom feed
* vmac test fails on s390
@ 2010-01-14 14:05 Jan Glauber
  2010-01-17 11:05 ` Herbert Xu
  0 siblings, 1 reply; 10+ messages in thread
From: Jan Glauber @ 2010-01-14 14:05 UTC (permalink / raw)
  To: linux-crypto

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,



^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2010-03-16  5:31 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-01-14 14:05 vmac test fails on s390 Jan Glauber
2010-01-17 11:05 ` Herbert Xu
2010-02-11  3:18   ` [PATCH] to fix " Wang, Shane
2010-02-16 12:39     ` Herbert Xu
2010-02-20  6:29       ` Wang, Shane
2010-02-21  5:32   ` Wang, Shane
     [not found]     ` <20100221182722.GB11951@Chamillionaire.breakpoint.cc>
2010-02-22  3:21       ` Wang, Shane
2010-03-02 13:57         ` Herbert Xu
2010-03-16  5:25           ` Wang, Shane
2010-03-16  5:31             ` Herbert Xu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox