On Tue, Mar 16, 2010 at 01:25:54PM +0800, Wang, Shane wrote:
> That should be simpler and better.
OK can you please resubmit the patch?
Thanks,
--
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~}
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana
That should be simpler and better.
Thanks.
Shane
-Original Message-
From: Herbert Xu [mailto:herb...@gondor.apana.org.au]
Sent: 2010年3月2日 21:57
To: Wang, Shane
Cc: Sebastian Andrzej Siewior; Jan Glauber; Cihula, Joseph; linux-crypto
Subject: Re: [PATCH] to fix vmac test fails on s390
On Mon, Feb 22, 2010 at 11:21:04AM +0800, Wang, Shane wrote:
>
> @@ -474,7 +475,10 @@ static u64 vmac(unsigned char m[], unsig
> }
> p = be64_to_cpup(out_p + i);
> h = vhash(m, mbytes, (u64 *)0, &ctx->__vmac_ctx);
> - return p + h;
> + r = p + h;
> + r = le64_to_cpup(&
This patch is to fix the vmac algorithm, add more test cases for vmac, and fix
the test failure on some big endian system like s390.
Signed-off-by: Shane Wang
crypto/testmgr.h | 64 +---
crypto/vmac.c| 80 ++---
* Wang, Shane | 2010-02-21 13:32:49 [+0800]:
>--- a/crypto/vmac.cThu Feb 11 00:45:57 2010 -0800
>+++ b/crypto/vmac.cSun Feb 21 02:23:01 2010 -0800
>@@ -42,6 +42,8 @@ const u64 m63 = UINT64_C(0x7ff
> const u64 m63 = UINT64_C(0x7fff); /* 63-bit mask */
> const
This patch is to fix the vmac algorithm, add more test cases for vmac, and fix
the test failure on some big endian system like s390.
Signed-off-by: Shane Wang
crypto/testmgr.h | 64 +++--
crypto/vmac.c| 77 ++---
2
Herbert Xu wrote:
> Sorry but you can't fix it like this. Your hash output must be
> invariant with respect to endianness.
>
> That means, whether I run it on a big-endian machine or a little-
> endian one it should produce the same output.
>
> Otherwise this hash will be totally useless as soon
On Thu, Feb 11, 2010 at 11:18:08AM +0800, Wang, Shane wrote:
>
> static struct hash_testvec aes_vmac128_tv_template[] = {
> {
> + .key= "\x00\x01\x02\x03\x04\x05\x06\x07"
> + "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
> + .plaintext = NULL,
> +#ifde
Herbert,
Here is the patch to fix it. I missed an important fact that the digest of vmac
is not a string or a char array, but an 64bit integer.
This patch is to fix the vmac algorithm, add more test cases for vmac, and fix
the test failure on some big endian system like s390.
(the attachment is