From: "Wang, Shane" Subject: [PATCH] to fix vmac test fails on s390 Date: Thu, 11 Feb 2010 11:18:08 +0800 Message-ID: <6CADD16F56BC954D8E28F3836FA7ED711EB163307A@shzsmsx501.ccr.corp.intel.com> References: <1263477930.5880.22.camel@bender> <20100117110546.GA32690@gondor.apana.org.au> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="_002_6CADD16F56BC954D8E28F3836FA7ED711EB163307Ashzsmsx501ccr_" Cc: linux-crypto To: Herbert Xu , Jan Glauber , "Cihula, Joseph" Return-path: Received: from mga14.intel.com ([143.182.124.37]:44769 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751754Ab0BKDTu (ORCPT ); Wed, 10 Feb 2010 22:19:50 -0500 In-Reply-To: <20100117110546.GA32690@gondor.apana.org.au> Content-Language: en-US Sender: linux-crypto-owner@vger.kernel.org List-ID: --_002_6CADD16F56BC954D8E28F3836FA7ED711EB163307Ashzsmsx501ccr_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable 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 for applying the patch) Signed-off-by: Shane Wang crypto/testmgr.h | 96 +++++++++++++++++++++++++++++++++++++++++++-- crypto/vmac.c | 74 ++++++++++++++++------------------ 2 files changed, 128 insertions(+), 42 deletions(-) diff -r 91636f5ce7a2 crypto/testmgr.h --- a/crypto/testmgr.h Thu Feb 11 00:45:57 2010 -0800 +++ b/crypto/testmgr.h Thu Feb 11 01:20:22 2010 -0800 @@ -1669,17 +1669,105 @@ static struct hash_testvec aes_xcbc128_t } }; =20 -#define VMAC_AES_TEST_VECTORS 1 -static char vmac_string[128] =3D {'\x01', '\x01', '\x01', '\x01', +#define VMAC_AES_TEST_VECTORS 8 +static char vmac_string1[128] =3D {'\x01', '\x01', '\x01', '\x01', '\x02', '\x03', '\x02', '\x02', '\x02', '\x04', '\x01', '\x07', '\x04', '\x01', '\x04', '\x03',}; +static char vmac_string2[128] =3D {'a', 'b', 'c',}; +static char vmac_string3[128] =3D {'a', 'b', 'c', 'a', 'b', 'c', + 'a', 'b', 'c', 'a', 'b', 'c', + 'a', 'b', 'c', 'a', 'b', 'c', + 'a', 'b', 'c', 'a', 'b', 'c', + 'a', 'b', 'c', 'a', 'b', 'c', + 'a', 'b', 'c', 'a', 'b', 'c', + 'a', 'b', 'c', 'a', 'b', 'c', + 'a', 'b', 'c', 'a', 'b', 'c', + }; + static struct hash_testvec aes_vmac128_tv_template[] =3D { { + .key =3D "\x00\x01\x02\x03\x04\x05\x06\x07" + "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f", + .plaintext =3D NULL, +#ifdef __LITTLE_ENDIAN + .digest =3D "\x07\x58\x80\x35\x77\xa4\x7b\x54", +#else + .digest =3D "\x54\x7b\xa4\x77\x35\x80\x58\x07", +#endif + .psize =3D 0, + .ksize =3D 16, + }, { .key =3D "\x00\x01\x02\x03\x04\x05\x06\x07" "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f", - .plaintext =3D vmac_string, - .digest =3D "\xcb\xd7\x8a\xfd\xb7\x33\x79\xe7", + .plaintext =3D vmac_string1, +#ifdef __LITTLE_ENDIAN + .digest =3D "\xce\xf5\x3c\xd3\xae\x68\x8c\xa1", +#else + .digest =3D "\xa1\x8c\x68\xae\xd3\x3c\xf5\xce", +#endif + .psize =3D 128, + .ksize =3D 16, + }, { + .key =3D "\x00\x01\x02\x03\x04\x05\x06\x07" + "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f", + .plaintext =3D vmac_string2, +#ifdef __LITTLE_ENDIAN + .digest =3D "\xc9\x27\xb0\x73\x81\xbd\x14\x2d", +#else + .digest =3D "\x2d\x14\xbd\x81\x73\xb0\x27\xc9", +#endif + .psize =3D 128, + .ksize =3D 16, + }, { + .key =3D "\x00\x01\x02\x03\x04\x05\x06\x07" + "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f", + .plaintext =3D vmac_string3, +#ifdef __LITTLE_ENDIAN + .digest =3D "\x8d\x1a\x95\x8c\x98\x47\x0b\x19", +#else + .digest =3D "\x19\x0b\x47\x98\x8c\x95\x1a\x8d", +#endif + .psize =3D 128, + .ksize =3D 16, + }, { + .key =3D "abcdefghijklmnop", + .plaintext =3D NULL, +#ifdef __LITTLE_ENDIAN + .digest =3D "\x3b\x89\xa1\x26\x9e\x55\x8f\x84", +#else + .digest =3D "\x84\x8f\x55\x9e\x26\xa1\x89\x3b", +#endif + .psize =3D 0, + .ksize =3D 16, + }, { + .key =3D "abcdefghijklmnop", + .plaintext =3D vmac_string1, +#ifdef __LITTLE_ENDIAN + .digest =3D "\xab\x5e\xab\xb0\xf6\x8d\x74\xc2", +#else + .digest =3D "\xc2\x74\x8d\xf6\xb0\xab\x5e\xab", +#endif + .psize =3D 128, + .ksize =3D 16, + }, { + .key =3D "abcdefghijklmnop", + .plaintext =3D vmac_string2, +#ifdef __LITTLE_ENDIAN + .digest =3D "\x11\x15\x68\x42\x3d\x7b\x09\xdf", +#else + .digest =3D "\xdf\x09\x7b\x3d\x42\x68\x15\x11", +#endif + .psize =3D 128, + .ksize =3D 16, + }, { + .key =3D "abcdefghijklmnop", + .plaintext =3D vmac_string3, +#ifdef __LITTLE_ENDIAN + .digest =3D "\x8b\x32\x8f\xe1\xed\x8f\xfa\xd4", +#else + .digest =3D "\xd4\xfa\x8f\xed\xe1\x8f\x32\x8b", +#endif .psize =3D 128, .ksize =3D 16, }, diff -r 91636f5ce7a2 crypto/vmac.c --- a/crypto/vmac.c Thu Feb 11 00:45:57 2010 -0800 +++ b/crypto/vmac.c Thu Feb 11 01:20:22 2010 -0800 @@ -42,6 +42,8 @@ const u64 m63 =3D UINT64_C(0x7ffffffffff const u64 m63 =3D UINT64_C(0x7fffffffffffffff); /* 63-bit mask */ const u64 m64 =3D UINT64_C(0xffffffffffffffff); /* 64-bit mask */ const u64 mpoly =3D UINT64_C(0x1fffffff1fffffff); /* Poly key mask */ + +#define pe64_to_cpup le64_to_cpup /* Prefer little endian */ =20 #ifdef __LITTLE_ENDIAN #define INDEX_HIGH 1 @@ -110,8 +112,8 @@ const u64 mpoly =3D UINT64_C(0x1fffffff1ff int i; u64 th, tl; \ rh =3D rl =3D 0; \ for (i =3D 0; i < nw; i +=3D 2) { \ - MUL64(th, tl, le64_to_cpup((mp)+i)+(kp)[i], \ - le64_to_cpup((mp)+i+1)+(kp)[i+1]); \ + MUL64(th, tl, pe64_to_cpup((mp)+i)+(kp)[i], \ + pe64_to_cpup((mp)+i+1)+(kp)[i+1]); \ ADD128(rh, rl, th, tl); \ } \ } while (0) @@ -121,11 +123,11 @@ const u64 mpoly =3D UINT64_C(0x1fffffff1ff int i; u64 th, tl; \ rh1 =3D rl1 =3D rh =3D rl =3D 0; \ for (i =3D 0; i < nw; i +=3D 2) { \ - MUL64(th, tl, le64_to_cpup((mp)+i)+(kp)[i], \ - le64_to_cpup((mp)+i+1)+(kp)[i+1]); \ + MUL64(th, tl, pe64_to_cpup((mp)+i)+(kp)[i], \ + pe64_to_cpup((mp)+i+1)+(kp)[i+1]); \ ADD128(rh, rl, th, tl); \ - MUL64(th, tl, le64_to_cpup((mp)+i)+(kp)[i+2], \ - le64_to_cpup((mp)+i+1)+(kp)[i+3]); \ + MUL64(th, tl, pe64_to_cpup((mp)+i)+(kp)[i+2], \ + pe64_to_cpup((mp)+i+1)+(kp)[i+3]); \ ADD128(rh1, rl1, th, tl); \ } \ } while (0) @@ -136,17 +138,17 @@ const u64 mpoly =3D UINT64_C(0x1fffffff1ff int i; u64 th, tl; \ rh =3D rl =3D 0; \ for (i =3D 0; i < nw; i +=3D 8) { \ - MUL64(th, tl, le64_to_cpup((mp)+i)+(kp)[i], \ - le64_to_cpup((mp)+i+1)+(kp)[i+1]); \ + MUL64(th, tl, pe64_to_cpup((mp)+i)+(kp)[i], \ + pe64_to_cpup((mp)+i+1)+(kp)[i+1]); \ ADD128(rh, rl, th, tl); \ - MUL64(th, tl, le64_to_cpup((mp)+i+2)+(kp)[i+2], \ - le64_to_cpup((mp)+i+3)+(kp)[i+3]); \ + MUL64(th, tl, pe64_to_cpup((mp)+i+2)+(kp)[i+2], \ + pe64_to_cpup((mp)+i+3)+(kp)[i+3]); \ ADD128(rh, rl, th, tl); \ - MUL64(th, tl, le64_to_cpup((mp)+i+4)+(kp)[i+4], \ - le64_to_cpup((mp)+i+5)+(kp)[i+5]); \ + MUL64(th, tl, pe64_to_cpup((mp)+i+4)+(kp)[i+4], \ + pe64_to_cpup((mp)+i+5)+(kp)[i+5]); \ ADD128(rh, rl, th, tl); \ - MUL64(th, tl, le64_to_cpup((mp)+i+6)+(kp)[i+6], \ - le64_to_cpup((mp)+i+7)+(kp)[i+7]); \ + MUL64(th, tl, pe64_to_cpup((mp)+i+6)+(kp)[i+6], \ + pe64_to_cpup((mp)+i+7)+(kp)[i+7]); \ ADD128(rh, rl, th, tl); \ } \ } while (0) @@ -156,29 +158,29 @@ const u64 mpoly =3D UINT64_C(0x1fffffff1ff int i; u64 th, tl; \ rh1 =3D rl1 =3D rh =3D rl =3D 0; \ for (i =3D 0; i < nw; i +=3D 8) { \ - MUL64(th, tl, le64_to_cpup((mp)+i)+(kp)[i], \ - le64_to_cpup((mp)+i+1)+(kp)[i+1]); \ + MUL64(th, tl, pe64_to_cpup((mp)+i)+(kp)[i], \ + pe64_to_cpup((mp)+i+1)+(kp)[i+1]); \ ADD128(rh, rl, th, tl); \ - MUL64(th, tl, le64_to_cpup((mp)+i)+(kp)[i+2], \ - le64_to_cpup((mp)+i+1)+(kp)[i+3]); \ + MUL64(th, tl, pe64_to_cpup((mp)+i)+(kp)[i+2], \ + pe64_to_cpup((mp)+i+1)+(kp)[i+3]); \ ADD128(rh1, rl1, th, tl); \ - MUL64(th, tl, le64_to_cpup((mp)+i+2)+(kp)[i+2], \ - le64_to_cpup((mp)+i+3)+(kp)[i+3]); \ + MUL64(th, tl, pe64_to_cpup((mp)+i+2)+(kp)[i+2], \ + pe64_to_cpup((mp)+i+3)+(kp)[i+3]); \ ADD128(rh, rl, th, tl); \ - MUL64(th, tl, le64_to_cpup((mp)+i+2)+(kp)[i+4], \ - le64_to_cpup((mp)+i+3)+(kp)[i+5]); \ + MUL64(th, tl, pe64_to_cpup((mp)+i+2)+(kp)[i+4], \ + pe64_to_cpup((mp)+i+3)+(kp)[i+5]); \ ADD128(rh1, rl1, th, tl); \ - MUL64(th, tl, le64_to_cpup((mp)+i+4)+(kp)[i+4], \ - le64_to_cpup((mp)+i+5)+(kp)[i+5]); \ + MUL64(th, tl, pe64_to_cpup((mp)+i+4)+(kp)[i+4], \ + pe64_to_cpup((mp)+i+5)+(kp)[i+5]); \ ADD128(rh, rl, th, tl); \ - MUL64(th, tl, le64_to_cpup((mp)+i+4)+(kp)[i+6], \ - le64_to_cpup((mp)+i+5)+(kp)[i+7]); \ + MUL64(th, tl, pe64_to_cpup((mp)+i+4)+(kp)[i+6], \ + pe64_to_cpup((mp)+i+5)+(kp)[i+7]); \ ADD128(rh1, rl1, th, tl); \ - MUL64(th, tl, le64_to_cpup((mp)+i+6)+(kp)[i+6], \ - le64_to_cpup((mp)+i+7)+(kp)[i+7]); \ + MUL64(th, tl, pe64_to_cpup((mp)+i+6)+(kp)[i+6], \ + pe64_to_cpup((mp)+i+7)+(kp)[i+7]); \ ADD128(rh, rl, th, tl); \ - MUL64(th, tl, le64_to_cpup((mp)+i+6)+(kp)[i+8], \ - le64_to_cpup((mp)+i+7)+(kp)[i+9]); \ + MUL64(th, tl, pe64_to_cpup((mp)+i+6)+(kp)[i+8], \ + pe64_to_cpup((mp)+i+7)+(kp)[i+9]); \ ADD128(rh1, rl1, th, tl); \ } \ } while (0) @@ -216,8 +218,8 @@ const u64 mpoly =3D UINT64_C(0x1fffffff1ff int i; \ rh =3D rl =3D t =3D 0; \ for (i =3D 0; i < nw; i +=3D 2) { \ - t1 =3D le64_to_cpup(mp+i) + kp[i]; \ - t2 =3D le64_to_cpup(mp+i+1) + kp[i+1]; \ + t1 =3D pe64_to_cpup(mp+i) + kp[i]; \ + t2 =3D pe64_to_cpup(mp+i+1) + kp[i+1]; \ m2 =3D MUL32(t1 >> 32, t2); \ m1 =3D MUL32(t1, t2 >> 32); \ ADD128(rh, rl, MUL32(t1 >> 32, t2 >> 32), \ @@ -322,8 +324,7 @@ static void vhash_abort(struct vmac_ctx=20 ctx->first_block_processed =3D 0; } =20 -static u64 l3hash(u64 p1, u64 p2, - u64 k1, u64 k2, u64 len) +static u64 l3hash(u64 p1, u64 p2, u64 k1, u64 k2, u64 len) { u64 rh, rl, t, z =3D 0; =20 @@ -549,10 +550,6 @@ static int vmac_setkey(struct crypto_sha =20 static int vmac_init(struct shash_desc *pdesc) { - struct crypto_shash *parent =3D pdesc->tfm; - struct vmac_ctx_t *ctx =3D crypto_shash_ctx(parent); - - memset(&ctx->__vmac_ctx, 0, sizeof(struct vmac_ctx)); return 0; } =20 @@ -575,6 +572,7 @@ static int vmac_final(struct shash_desc=20 u8 nonce[16] =3D {}; =20 mac =3D vmac(NULL, 0, nonce, NULL, ctx); + memcpy(out, &mac, sizeof(vmac_t)); memset(&mac, 0, sizeof(vmac_t)); memset(&ctx->__vmac_ctx, 0, sizeof(struct vmac_ctx)); Herbert Xu wrote: > On Thu, Jan 14, 2010 at 02:05:30PM +0000, Jan Glauber wrote: >> Hi, >>=20 >> 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=20 >>=20 >> Looking at the digest from the failing test vector: >>=20 >> .digest =3D "\xcb\xd7\x8a\xfd\xb7\x33\x79\xe7", >>=20 >> 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=20 >> it should be done at another place? >=20 > Shane, please look into this. >=20 > Thanks, --_002_6CADD16F56BC954D8E28F3836FA7ED711EB163307Ashzsmsx501ccr_ Content-Type: application/octet-stream; name="vmac_fix.patch" Content-Description: vmac_fix.patch Content-Disposition: attachment; filename="vmac_fix.patch"; size=9186; creation-date="Thu, 11 Feb 2010 02:53:00 GMT"; modification-date="Thu, 11 Feb 2010 02:53:00 GMT" Content-Transfer-Encoding: base64 VGhpcyBwYXRjaCBpcyB0byBmaXggdGhlIHZtYWMgYWxnb3JpdGhtLCBhZGQgbW9yZSB0ZXN0IGNh c2VzIGZvciB2bWFjLCBhbmQgZml4IHRoZSB0ZXN0IGZhaWx1cmUgb24gc29tZSBiaWcgZW5kaWFu IHN5c3RlbSBsaWtlIHMzOTAuCgpTaWduZWQtb2ZmLWJ5OiBTaGFuZSBXYW5nIDxzaGFuZS53YW5n QGludGVsLmNvbT4KCmRpZmYgLXIgOTE2MzZmNWNlN2EyIGNyeXB0by90ZXN0bWdyLmgKLS0tIGEv Y3J5cHRvL3Rlc3RtZ3IuaAlUaHUgRmViIDExIDAwOjQ1OjU3IDIwMTAgLTA4MDAKKysrIGIvY3J5 cHRvL3Rlc3RtZ3IuaAlUaHUgRmViIDExIDAxOjIwOjIyIDIwMTAgLTA4MDAKQEAgLTE2NjksMTcg KzE2NjksMTA1IEBAIHN0YXRpYyBzdHJ1Y3QgaGFzaF90ZXN0dmVjIGFlc194Y2JjMTI4X3QKIAl9 CiB9OwogCi0jZGVmaW5lIFZNQUNfQUVTX1RFU1RfVkVDVE9SUwkxCi1zdGF0aWMgY2hhciB2bWFj X3N0cmluZ1sxMjhdID0geydceDAxJywgJ1x4MDEnLCAnXHgwMScsICdceDAxJywKKyNkZWZpbmUg Vk1BQ19BRVNfVEVTVF9WRUNUT1JTCTgKK3N0YXRpYyBjaGFyIHZtYWNfc3RyaW5nMVsxMjhdID0g eydceDAxJywgJ1x4MDEnLCAnXHgwMScsICdceDAxJywKIAkJCQknXHgwMicsICdceDAzJywgJ1x4 MDInLCAnXHgwMicsCiAJCQkJJ1x4MDInLCAnXHgwNCcsICdceD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