* [dpdk-dev] [PATCH v1] test/crypto: fix: test vectors for zuc 256 bit key
@ 2021-10-27 8:40 Vidya Sagar Velumuri
2021-10-28 7:10 ` Akhil Goyal
` (2 more replies)
0 siblings, 3 replies; 14+ messages in thread
From: Vidya Sagar Velumuri @ 2021-10-27 8:40 UTC (permalink / raw)
To: adwivedi, anoobj, ktejasree, ndabilpuram, gakhil, declan.doherty; +Cc: dev
Fix the IV and MAC in the test vectors added for zuc 256-bit key
Fixes: fa5bf9345d4e (test/crypto: add ZUC cases with 256-bit keys)
Signed-off-by: Vidya Sagar Velumuri <vvelumuri@marvell.com>
diff --git a/app/test/test_cryptodev.c b/app/test/test_cryptodev.c
index 814a0b401d..773db1dbea 100644
--- a/app/test/test_cryptodev.c
+++ b/app/test/test_cryptodev.c
@@ -7179,7 +7179,7 @@ test_zuc_hash_generate_test_case_9(void)
static int
test_zuc_hash_generate_test_case_10(void)
{
- return test_zuc_authentication(&zuc_test_case_auth_2080b_mac_128b);
+ return test_zuc_authentication(&zuc_test_case_auth_584b_mac_128b);
}
static int
diff --git a/app/test/test_cryptodev_zuc_test_vectors.h b/app/test/test_cryptodev_zuc_test_vectors.h
index 35bbe0f6c4..ba5c68ca72 100644
--- a/app/test/test_cryptodev_zuc_test_vectors.h
+++ b/app/test/test_cryptodev_zuc_test_vectors.h
@@ -522,18 +522,19 @@ static struct wireless_test_data zuc_test_case_cipher_800b_key_256b = {
.data = {
0xE5, 0xBD, 0x3E, 0xA0, 0xEB, 0x55, 0xAD, 0xE8,
0x66, 0xC6, 0xAC, 0x58, 0xBD, 0x54, 0x30, 0x2A,
- 0xE5, 0xBD, 0x3E, 0xA0, 0xEB, 0x55, 0xAD, 0xE8,
- 0x66, 0xC6, 0xAC, 0x58, 0xBD, 0x54, 0x30, 0x2A
+ 0x66, 0xC6, 0xAC, 0x58, 0xBD, 0x54, 0x30, 0x2A,
+ 0xE5, 0xBD, 0x3E, 0xA0, 0xEB, 0x55, 0xAD, 0xE8
},
.len = 32
},
.cipher_iv = {
.data = {
- 0x00, 0x05, 0x68, 0x23, 0xC4, 0x00, 0x00, 0x00,
- 0x00, 0x05, 0x68, 0x23, 0xC4, 0x00, 0x00, 0x00,
- 0x00, 0x05, 0x68, 0x23, 0xC4, 0x00, 0x00, 0x00
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+ 0x3f
},
- .len = 24
+ .len = 25
},
.plaintext = {
.data = {
@@ -555,19 +556,19 @@ static struct wireless_test_data zuc_test_case_cipher_800b_key_256b = {
},
.ciphertext = {
.data = {
- 0xd0, 0xb4, 0x09, 0x5a, 0x83, 0xf3, 0x8d, 0x2a,
- 0x8a, 0xc1, 0x75, 0x5a, 0xed, 0x53, 0xd3, 0xc6,
- 0x15, 0x9d, 0x8c, 0x12, 0x98, 0x89, 0x66, 0x28,
- 0x05, 0xc8, 0xd1, 0xc4, 0xbf, 0xf7, 0x72, 0x79,
- 0xc7, 0x42, 0xde, 0xc8, 0xdc, 0xe9, 0xb4, 0x4a,
- 0x92, 0x85, 0x31, 0xb7, 0xc6, 0x51, 0x83, 0x0b,
- 0x96, 0x29, 0xdd, 0xe0, 0x3b, 0x7e, 0xbe, 0x7b,
- 0x34, 0x23, 0x1b, 0xe1, 0x8d, 0x8a, 0xe7, 0x0f,
- 0x12, 0x68, 0x41, 0x4e, 0xaa, 0xf0, 0xeb, 0x9d,
- 0xbf, 0xed, 0x00, 0xd9, 0x3c, 0x4d, 0x9a, 0xfb,
- 0x9c, 0xfe, 0xc7, 0xca, 0x3f, 0xd6, 0xbf, 0x03,
- 0x73, 0x67, 0xcc, 0xc2, 0x38, 0xa3, 0xe0, 0x6e,
- 0xe6, 0x4b, 0x63, 0x61
+ 0xf2, 0xd4, 0x1e, 0x24, 0x19, 0xb1, 0x86, 0x3f,
+ 0x31, 0x4a, 0x42, 0xc2, 0xfb, 0xf7, 0x54, 0xc4,
+ 0x2b, 0xd9, 0x45, 0xd1, 0x6b, 0xaa, 0xff, 0x5c,
+ 0x2d, 0x01, 0x28, 0x46, 0xf2, 0xa7, 0x36, 0xed,
+ 0xf7, 0x41, 0x69, 0xeb, 0x96, 0xf0, 0xa5, 0xa5,
+ 0xa3, 0xfa, 0xa3, 0x19, 0x8f, 0xac, 0x90, 0x84,
+ 0x1f, 0x06, 0xdc, 0x45, 0x9f, 0x04, 0xec, 0x75,
+ 0x06, 0xea, 0x79, 0xf5, 0x3e, 0x96, 0xa5, 0x31,
+ 0x04, 0xae, 0xca, 0x2b, 0x55, 0x7e, 0x8e, 0xc6,
+ 0x82, 0x6e, 0x44, 0x08, 0xd2, 0x56, 0xb6, 0xcf,
+ 0xa1, 0x10, 0xf7, 0x1a, 0x2b, 0xc0, 0x31, 0x9a,
+ 0x3a, 0x7b, 0xe7, 0xaf, 0xc5, 0xba, 0x7e, 0xa8,
+ 0x64, 0xfb, 0x1b, 0xa3
},
.len = 800
},
@@ -1108,68 +1109,48 @@ static struct wireless_test_data zuc_test_case_auth_584b = {
}
};
-static struct wireless_test_data zuc_test_case_auth_2080b_mac_128b = {
+static struct wireless_test_data zuc_test_case_auth_584b_mac_128b = {
.key = {
.data = {
- 0xC8, 0xA4, 0x82, 0x62, 0xD0, 0xC2, 0xE2, 0xBA,
- 0xC4, 0xB9, 0x6E, 0xF7, 0x7E, 0x80, 0xCA, 0x59,
- 0xC8, 0xA4, 0x82, 0x62, 0xD0, 0xC2, 0xE2, 0xBA,
- 0xC4, 0xB9, 0x6E, 0xF7, 0x7E, 0x80, 0xCA, 0x59
+ 0xc9, 0xe6, 0xce, 0xc4, 0x60, 0x7c, 0x72, 0xdb,
+ 0x00, 0x0a, 0xef, 0xa8, 0x83, 0x85, 0xab, 0x0a,
+ 0x00, 0x0a, 0xef, 0xa8, 0x83, 0x85, 0xab, 0x0a,
+ 0xc9, 0xe6, 0xce, 0xc4, 0x60, 0x7c, 0x72, 0xdb
},
.len = 32
},
.auth_iv = {
.data = {
- 0x05, 0x09, 0x78, 0x50, 0x80, 0x00, 0x00, 0x00,
- 0x85, 0x09, 0x78, 0x50, 0x80, 0x00, 0x80, 0x00,
- 0x85, 0x09, 0x78, 0x50, 0x80, 0x00, 0x80, 0x00
- },
- .len = 24
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+ 0x3f
+ },
+ .len = 25
},
.plaintext = {
.data = {
- 0xB5, 0x46, 0x43, 0x0B, 0xF8, 0x7B, 0x4F, 0x1E,
- 0xE8, 0x34, 0x70, 0x4C, 0xD6, 0x95, 0x1C, 0x36,
- 0xE2, 0x6F, 0x10, 0x8C, 0xF7, 0x31, 0x78, 0x8F,
- 0x48, 0xDC, 0x34, 0xF1, 0x67, 0x8C, 0x05, 0x22,
- 0x1C, 0x8F, 0xA7, 0xFF, 0x2F, 0x39, 0xF4, 0x77,
- 0xE7, 0xE4, 0x9E, 0xF6, 0x0A, 0x4E, 0xC2, 0xC3,
- 0xDE, 0x24, 0x31, 0x2A, 0x96, 0xAA, 0x26, 0xE1,
- 0xCF, 0xBA, 0x57, 0x56, 0x38, 0x38, 0xB2, 0x97,
- 0xF4, 0x7E, 0x85, 0x10, 0xC7, 0x79, 0xFD, 0x66,
- 0x54, 0xB1, 0x43, 0x38, 0x6F, 0xA6, 0x39, 0xD3,
- 0x1E, 0xDB, 0xD6, 0xC0, 0x6E, 0x47, 0xD1, 0x59,
- 0xD9, 0x43, 0x62, 0xF2, 0x6A, 0xEE, 0xED, 0xEE,
- 0x0E, 0x4F, 0x49, 0xD9, 0xBF, 0x84, 0x12, 0x99,
- 0x54, 0x15, 0xBF, 0xAD, 0x56, 0xEE, 0x82, 0xD1,
- 0xCA, 0x74, 0x63, 0xAB, 0xF0, 0x85, 0xB0, 0x82,
- 0xB0, 0x99, 0x04, 0xD6, 0xD9, 0x90, 0xD4, 0x3C,
- 0xF2, 0xE0, 0x62, 0xF4, 0x08, 0x39, 0xD9, 0x32,
- 0x48, 0xB1, 0xEB, 0x92, 0xCD, 0xFE, 0xD5, 0x30,
- 0x0B, 0xC1, 0x48, 0x28, 0x04, 0x30, 0xB6, 0xD0,
- 0xCA, 0xA0, 0x94, 0xB6, 0xEC, 0x89, 0x11, 0xAB,
- 0x7D, 0xC3, 0x68, 0x24, 0xB8, 0x24, 0xDC, 0x0A,
- 0xF6, 0x68, 0x2B, 0x09, 0x35, 0xFD, 0xE7, 0xB4,
- 0x92, 0xA1, 0x4D, 0xC2, 0xF4, 0x36, 0x48, 0x03,
- 0x8D, 0xA2, 0xCF, 0x79, 0x17, 0x0D, 0x2D, 0x50,
- 0x13, 0x3F, 0xD4, 0x94, 0x16, 0xCB, 0x6E, 0x33,
- 0xBE, 0xA9, 0x0B, 0x8B, 0xF4, 0x55, 0x9B, 0x03,
- 0x73, 0x2A, 0x01, 0xEA, 0x29, 0x0E, 0x6D, 0x07,
- 0x4F, 0x79, 0xBB, 0x83, 0xC1, 0x0E, 0x58, 0x00,
- 0x15, 0xCC, 0x1A, 0x85, 0xB3, 0x6B, 0x55, 0x01,
- 0x04, 0x6E, 0x9C, 0x4B, 0xDC, 0xAE, 0x51, 0x35,
- 0x69, 0x0B, 0x86, 0x66, 0xBD, 0x54, 0xB7, 0xA7,
- 0x03, 0xEA, 0x7B, 0x6F, 0x22, 0x0A, 0x54, 0x69,
- 0xA5, 0x68, 0x02, 0x7E
+ 0x98, 0x3b, 0x41, 0xd4, 0x7d, 0x78, 0x0c, 0x9e,
+ 0x1a, 0xd1, 0x1d, 0x7e, 0xb7, 0x03, 0x91, 0xb1,
+ 0xde, 0x0b, 0x35, 0xda, 0x2d, 0xc6, 0x2f, 0x83,
+ 0xe7, 0xb7, 0x8d, 0x63, 0x06, 0xca, 0x0e, 0xa0,
+ 0x7e, 0x94, 0x1b, 0x7b, 0xe9, 0x13, 0x48, 0xf9,
+ 0xfc, 0xb1, 0x70, 0xe2, 0x21, 0x7f, 0xec, 0xd9,
+ 0x7f, 0x9f, 0x68, 0xad, 0xb1, 0x6e, 0x5d, 0x7d,
+ 0x21, 0xe5, 0x69, 0xd2, 0x80, 0xed, 0x77, 0x5c,
+ 0xeb, 0xde, 0x3f, 0x40, 0x93, 0xc5, 0x38, 0x81,
+ 0x00, 0x00, 0x00, 0x00
},
- .len = 2080
+ .len = 584
},
.validAuthLenInBits = {
- .len = 2080
+ .len = 584
},
.digest = {
- .data = {0x05, 0x9f, 0xd8, 0x21, 0x90, 0xfb, 0x13, 0x26,
- 0x94, 0x37, 0x6d, 0xc0, 0xcc, 0x52, 0xb9, 0xcc},
+ .data = {
+ 0x11, 0x84, 0xee, 0x30, 0xc6, 0x57, 0xa5, 0xd4,
+ 0x0d, 0x3f, 0xf5, 0xfa, 0xee, 0xdd, 0x65, 0x31
+ },
.len = 16
}
};
@@ -1179,18 +1160,19 @@ static struct wireless_test_data zuc_test_case_auth_584b_mac_64b = {
.data = {
0xc9, 0xe6, 0xce, 0xc4, 0x60, 0x7c, 0x72, 0xdb,
0x00, 0x0a, 0xef, 0xa8, 0x83, 0x85, 0xab, 0x0a,
- 0xc9, 0xe6, 0xce, 0xc4, 0x60, 0x7c, 0x72, 0xdb,
- 0x00, 0x0a, 0xef, 0xa8, 0x83, 0x85, 0xab, 0x0a
+ 0x00, 0x0a, 0xef, 0xa8, 0x83, 0x85, 0xab, 0x0a,
+ 0xc9, 0xe6, 0xce, 0xc4, 0x60, 0x7c, 0x72, 0xdb
},
.len = 32
},
.auth_iv = {
.data = {
- 0xa9, 0x40, 0x59, 0xda, 0x50, 0x0, 0x0, 0x0,
- 0x29, 0x40, 0x59, 0xda, 0x50, 0x0, 0x80, 0x0,
- 0x29, 0x40, 0x59, 0xda, 0x50, 0x0, 0x80, 0x0
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+ 0x3f
},
- .len = 24
+ .len = 25
},
.plaintext = {
.data = {
@@ -1211,7 +1193,7 @@ static struct wireless_test_data zuc_test_case_auth_584b_mac_64b = {
.len = 584
},
.digest = {
- .data = {0xf5, 0x45, 0x4a, 0x75, 0x22, 0x39, 0x4b, 0xf2},
+ .data = {0xb4, 0x21, 0x4e, 0x0b, 0x8d, 0x34, 0xd4, 0x8e},
.len = 8
}
};
--
2.31.1
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [dpdk-dev] [PATCH v1] test/crypto: fix: test vectors for zuc 256 bit key
2021-10-27 8:40 [dpdk-dev] [PATCH v1] test/crypto: fix: test vectors for zuc 256 bit key Vidya Sagar Velumuri
@ 2021-10-28 7:10 ` Akhil Goyal
2021-10-29 12:37 ` De Lara Guarch, Pablo
2021-11-03 6:55 ` [dpdk-dev] [PATCH v2] " Vidya Sagar Velumuri
2 siblings, 0 replies; 14+ messages in thread
From: Akhil Goyal @ 2021-10-28 7:10 UTC (permalink / raw)
To: Vidya Sagar Velumuri, Ankur Dwivedi, Anoob Joseph,
Tejasree Kondoj, Nithin Kumar Dabilpuram, declan.doherty,
Fan Zhang, ciara.power
Cc: dev
> Fix the IV and MAC in the test vectors added for zuc 256-bit key
>
> Fixes: fa5bf9345d4e (test/crypto: add ZUC cases with 256-bit keys)
>
> Signed-off-by: Vidya Sagar Velumuri <vvelumuri@marvell.com>
>
@Fan Zhang, @ciara.power@intel.com: can you verify at your end?
And see if Bug 828 in Bugzilla gets resolved with this.
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [dpdk-dev] [PATCH v1] test/crypto: fix: test vectors for zuc 256 bit key
2021-10-27 8:40 [dpdk-dev] [PATCH v1] test/crypto: fix: test vectors for zuc 256 bit key Vidya Sagar Velumuri
2021-10-28 7:10 ` Akhil Goyal
@ 2021-10-29 12:37 ` De Lara Guarch, Pablo
2021-10-30 12:25 ` Vidya Sagar Velumuri
2021-11-03 6:55 ` [dpdk-dev] [PATCH v2] " Vidya Sagar Velumuri
2 siblings, 1 reply; 14+ messages in thread
From: De Lara Guarch, Pablo @ 2021-10-29 12:37 UTC (permalink / raw)
To: Vidya Sagar Velumuri, adwivedi, anoobj, ktejasree, ndabilpuram,
gakhil, Doherty, Declan
Cc: dev
Hi Vidya,
> -----Original Message-----
> From: dev <dev-bounces@dpdk.org> On Behalf Of Vidya Sagar Velumuri
> Sent: Wednesday, October 27, 2021 9:41 AM
> To: adwivedi@marvell.com; anoobj@marvell.com; ktejasree@marvell.com;
> ndabilpuram@marvell.com; gakhil@marvell.com; Doherty, Declan
> <declan.doherty@intel.com>
> Cc: dev@dpdk.org
> Subject: [dpdk-dev] [PATCH v1] test/crypto: fix: test vectors for zuc 256 bit key
>
> Fix the IV and MAC in the test vectors added for zuc 256-bit key
>
> Fixes: fa5bf9345d4e (test/crypto: add ZUC cases with 256-bit keys)
>
> Signed-off-by: Vidya Sagar Velumuri <vvelumuri@marvell.com>
The new vectors are failing for us. Could you check if the ones we added work for you?
Thanks,
Pablo
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [dpdk-dev] [PATCH v1] test/crypto: fix: test vectors for zuc 256 bit key
2021-10-29 12:37 ` De Lara Guarch, Pablo
@ 2021-10-30 12:25 ` Vidya Sagar Velumuri
2021-10-31 22:06 ` De Lara Guarch, Pablo
0 siblings, 1 reply; 14+ messages in thread
From: Vidya Sagar Velumuri @ 2021-10-30 12:25 UTC (permalink / raw)
To: De Lara Guarch, Pablo, Ankur Dwivedi, Anoob Joseph,
Tejasree Kondoj, Nithin Kumar Dabilpuram, Akhil Goyal, Doherty,
Declan
Cc: dev
Hi Pablo,
Tried the test vector zuc256_test_case_auth_1 and the digest did not match with the generated digest in our platform.
As per spec, IV[i] for i = 17 to\x14 24 are 6-bit string occupying the 6 least signi cant bits of a byte.
But in the vectors, The values in the IV(byte -17 to 24) are > 0x3f.
Could you please elaborate how these bytes are considered for generation of digest.
Regards
Sagar
________________________________
From: De Lara Guarch, Pablo <pablo.de.lara.guarch@intel.com>
Sent: 29 October 2021 18:07
To: Vidya Sagar Velumuri <vvelumuri@marvell.com>; Ankur Dwivedi <adwivedi@marvell.com>; Anoob Joseph <anoobj@marvell.com>; Tejasree Kondoj <ktejasree@marvell.com>; Nithin Kumar Dabilpuram <ndabilpuram@marvell.com>; Akhil Goyal <gakhil@marvell.com>; Doherty, Declan <declan.doherty@intel.com>
Cc: dev@dpdk.org <dev@dpdk.org>
Subject: [EXT] RE: [dpdk-dev] [PATCH v1] test/crypto: fix: test vectors for zuc 256 bit key
External Email
----------------------------------------------------------------------
Hi Vidya,
> -----Original Message-----
> From: dev <dev-bounces@dpdk.org> On Behalf Of Vidya Sagar Velumuri
> Sent: Wednesday, October 27, 2021 9:41 AM
> To: adwivedi@marvell.com; anoobj@marvell.com; ktejasree@marvell.com;
> ndabilpuram@marvell.com; gakhil@marvell.com; Doherty, Declan
> <declan.doherty@intel.com>
> Cc: dev@dpdk.org
> Subject: [dpdk-dev] [PATCH v1] test/crypto: fix: test vectors for zuc 256 bit key
>
> Fix the IV and MAC in the test vectors added for zuc 256-bit key
>
> Fixes: fa5bf9345d4e (test/crypto: add ZUC cases with 256-bit keys)
>
> Signed-off-by: Vidya Sagar Velumuri <vvelumuri@marvell.com>
The new vectors are failing for us. Could you check if the ones we added work for you?
Thanks,
Pablo
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [dpdk-dev] [PATCH v1] test/crypto: fix: test vectors for zuc 256 bit key
2021-10-30 12:25 ` Vidya Sagar Velumuri
@ 2021-10-31 22:06 ` De Lara Guarch, Pablo
2021-11-01 10:23 ` Vidya Sagar Velumuri
0 siblings, 1 reply; 14+ messages in thread
From: De Lara Guarch, Pablo @ 2021-10-31 22:06 UTC (permalink / raw)
To: Vidya Sagar Velumuri, Ankur Dwivedi, Anoob Joseph,
Tejasree Kondoj, Nithin Kumar Dabilpuram, Akhil Goyal, Doherty,
Declan
Cc: dev
Hi Sagar,
Thanks for flagging this. I submitted a patch fixing the IV of the test vectors I pushed (it didn't change the output):
http://patches.dpdk.org/project/dpdk/patch/20211031220421.52181-1-pablo.de.lara.guarch@intel.com/
Could you check if they work for you?
Thanks,
Pablo
From: Vidya Sagar Velumuri <vvelumuri@marvell.com>
Sent: Saturday, October 30, 2021 1:26 PM
To: De Lara Guarch, Pablo <pablo.de.lara.guarch@intel.com>; Ankur Dwivedi <adwivedi@marvell.com>; Anoob Joseph <anoobj@marvell.com>; Tejasree Kondoj <ktejasree@marvell.com>; Nithin Kumar Dabilpuram <ndabilpuram@marvell.com>; Akhil Goyal <gakhil@marvell.com>; Doherty, Declan <declan.doherty@intel.com>
Cc: dev@dpdk.org
Subject: Re: [dpdk-dev] [PATCH v1] test/crypto: fix: test vectors for zuc 256 bit key
Hi Pablo,
Tried the test vector zuc256_test_case_auth_1 and the digest did not match with the generated digest in our platform.
As per spec, IV[i] for i = 17 to\x14 24 are 6-bit string occupying the 6 least signi cant bits of a byte.
But in the vectors, The values in the IV(byte -17 to 24) are > 0x3f.
Could you please elaborate how these bytes are considered for generation of digest.
Regards
Sagar
________________________________
From: De Lara Guarch, Pablo <pablo.de.lara.guarch@intel.com<mailto:pablo.de.lara.guarch@intel.com>>
Sent: 29 October 2021 18:07
To: Vidya Sagar Velumuri <vvelumuri@marvell.com<mailto:vvelumuri@marvell.com>>; Ankur Dwivedi <adwivedi@marvell.com<mailto:adwivedi@marvell.com>>; Anoob Joseph <anoobj@marvell.com<mailto:anoobj@marvell.com>>; Tejasree Kondoj <ktejasree@marvell.com<mailto:ktejasree@marvell.com>>; Nithin Kumar Dabilpuram <ndabilpuram@marvell.com<mailto:ndabilpuram@marvell.com>>; Akhil Goyal <gakhil@marvell.com<mailto:gakhil@marvell.com>>; Doherty, Declan <declan.doherty@intel.com<mailto:declan.doherty@intel.com>>
Cc: dev@dpdk.org<mailto:dev@dpdk.org> <dev@dpdk.org<mailto:dev@dpdk.org>>
Subject: [EXT] RE: [dpdk-dev] [PATCH v1] test/crypto: fix: test vectors for zuc 256 bit key
External Email
----------------------------------------------------------------------
Hi Vidya,
> -----Original Message-----
> From: dev <dev-bounces@dpdk.org<mailto:dev-bounces@dpdk.org>> On Behalf Of Vidya Sagar Velumuri
> Sent: Wednesday, October 27, 2021 9:41 AM
> To: adwivedi@marvell.com<mailto:adwivedi@marvell.com>; anoobj@marvell.com<mailto:anoobj@marvell.com>; ktejasree@marvell.com<mailto:ktejasree@marvell.com>;
> ndabilpuram@marvell.com<mailto:ndabilpuram@marvell.com>; gakhil@marvell.com<mailto:gakhil@marvell.com>; Doherty, Declan
> <declan.doherty@intel.com<mailto:declan.doherty@intel.com>>
> Cc: dev@dpdk.org<mailto:dev@dpdk.org>
> Subject: [dpdk-dev] [PATCH v1] test/crypto: fix: test vectors for zuc 256 bit key
>
> Fix the IV and MAC in the test vectors added for zuc 256-bit key
>
> Fixes: fa5bf9345d4e (test/crypto: add ZUC cases with 256-bit keys)
>
> Signed-off-by: Vidya Sagar Velumuri <vvelumuri@marvell.com<mailto:vvelumuri@marvell.com>>
The new vectors are failing for us. Could you check if the ones we added work for you?
Thanks,
Pablo
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [dpdk-dev] [PATCH v1] test/crypto: fix: test vectors for zuc 256 bit key
2021-10-31 22:06 ` De Lara Guarch, Pablo
@ 2021-11-01 10:23 ` Vidya Sagar Velumuri
2021-11-02 4:40 ` Vidya Sagar Velumuri
0 siblings, 1 reply; 14+ messages in thread
From: Vidya Sagar Velumuri @ 2021-11-01 10:23 UTC (permalink / raw)
To: De Lara Guarch, Pablo, Ankur Dwivedi, Anoob Joseph,
Tejasree Kondoj, Nithin Kumar Dabilpuram, Akhil Goyal, Doherty,
Declan
Cc: dev
Hi Pablo,
Verified with updated test vector. the output did not change from previous output but also, it did not match the ouput present in the vector.
Regards
Sagar
________________________________
From: De Lara Guarch, Pablo <pablo.de.lara.guarch@intel.com>
Sent: 01 November 2021 03:36
To: Vidya Sagar Velumuri <vvelumuri@marvell.com>; Ankur Dwivedi <adwivedi@marvell.com>; Anoob Joseph <anoobj@marvell.com>; Tejasree Kondoj <ktejasree@marvell.com>; Nithin Kumar Dabilpuram <ndabilpuram@marvell.com>; Akhil Goyal <gakhil@marvell.com>; Doherty, Declan <declan.doherty@intel.com>
Cc: dev@dpdk.org <dev@dpdk.org>
Subject: [EXT] RE: [dpdk-dev] [PATCH v1] test/crypto: fix: test vectors for zuc 256 bit key
External Email
________________________________
Hi Sagar,
Thanks for flagging this. I submitted a patch fixing the IV of the test vectors I pushed (it didn’t change the output):
http://patches.dpdk.org/project/dpdk/patch/20211031220421.52181-1-pablo.de.lara.guarch@intel.com/<https://urldefense.proofpoint.com/v2/url?u=http-3A__patches.dpdk.org_project_dpdk_patch_20211031220421.52181-2D1-2Dpablo.de.lara.guarch-40intel.com_&d=DwMFAg&c=nKjWec2b6R0mOyPaz7xtfQ&r=9VCCg7VNdg-jfzaFw1fN59x7Py9yM-ofwvekNj6MPxM&m=2eElny5n4QewacnppQimeCdeyB6B6GXxfdF4oet4KAlTXpwgcfhUF0Z3q2Ph4evt&s=pputaMk4g9cVhsjiJ1euKMLuGx24bIVTDh0AA4WrKwI&e=>
Could you check if they work for you?
Thanks,
Pablo
From: Vidya Sagar Velumuri <vvelumuri@marvell.com>
Sent: Saturday, October 30, 2021 1:26 PM
To: De Lara Guarch, Pablo <pablo.de.lara.guarch@intel.com>; Ankur Dwivedi <adwivedi@marvell.com>; Anoob Joseph <anoobj@marvell.com>; Tejasree Kondoj <ktejasree@marvell.com>; Nithin Kumar Dabilpuram <ndabilpuram@marvell.com>; Akhil Goyal <gakhil@marvell.com>; Doherty, Declan <declan.doherty@intel.com>
Cc: dev@dpdk.org
Subject: Re: [dpdk-dev] [PATCH v1] test/crypto: fix: test vectors for zuc 256 bit key
Hi Pablo,
Tried the test vector zuc256_test_case_auth_1 and the digest did not match with the generated digest in our platform.
As per spec, IV[i] for i = 17 to\x14 24 are 6-bit string occupying the 6 least signi cant bits of a byte.
But in the vectors, The values in the IV(byte -17 to 24) are > 0x3f.
Could you please elaborate how these bytes are considered for generation of digest.
Regards
Sagar
________________________________
From: De Lara Guarch, Pablo <pablo.de.lara.guarch@intel.com<mailto:pablo.de.lara.guarch@intel.com>>
Sent: 29 October 2021 18:07
To: Vidya Sagar Velumuri <vvelumuri@marvell.com<mailto:vvelumuri@marvell.com>>; Ankur Dwivedi <adwivedi@marvell.com<mailto:adwivedi@marvell.com>>; Anoob Joseph <anoobj@marvell.com<mailto:anoobj@marvell.com>>; Tejasree Kondoj <ktejasree@marvell.com<mailto:ktejasree@marvell.com>>; Nithin Kumar Dabilpuram <ndabilpuram@marvell.com<mailto:ndabilpuram@marvell.com>>; Akhil Goyal <gakhil@marvell.com<mailto:gakhil@marvell.com>>; Doherty, Declan <declan.doherty@intel.com<mailto:declan.doherty@intel.com>>
Cc: dev@dpdk.org<mailto:dev@dpdk.org> <dev@dpdk.org<mailto:dev@dpdk.org>>
Subject: [EXT] RE: [dpdk-dev] [PATCH v1] test/crypto: fix: test vectors for zuc 256 bit key
External Email
----------------------------------------------------------------------
Hi Vidya,
> -----Original Message-----
> From: dev <dev-bounces@dpdk.org<mailto:dev-bounces@dpdk.org>> On Behalf Of Vidya Sagar Velumuri
> Sent: Wednesday, October 27, 2021 9:41 AM
> To: adwivedi@marvell.com<mailto:adwivedi@marvell.com>; anoobj@marvell.com<mailto:anoobj@marvell.com>; ktejasree@marvell.com<mailto:ktejasree@marvell.com>;
> ndabilpuram@marvell.com<mailto:ndabilpuram@marvell.com>; gakhil@marvell.com<mailto:gakhil@marvell.com>; Doherty, Declan
> <declan.doherty@intel.com<mailto:declan.doherty@intel.com>>
> Cc: dev@dpdk.org<mailto:dev@dpdk.org>
> Subject: [dpdk-dev] [PATCH v1] test/crypto: fix: test vectors for zuc 256 bit key
>
> Fix the IV and MAC in the test vectors added for zuc 256-bit key
>
> Fixes: fa5bf9345d4e (test/crypto: add ZUC cases with 256-bit keys)
>
> Signed-off-by: Vidya Sagar Velumuri <vvelumuri@marvell.com<mailto:vvelumuri@marvell.com>>
The new vectors are failing for us. Could you check if the ones we added work for you?
Thanks,
Pablo
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [dpdk-dev] [PATCH v1] test/crypto: fix: test vectors for zuc 256 bit key
2021-11-01 10:23 ` Vidya Sagar Velumuri
@ 2021-11-02 4:40 ` Vidya Sagar Velumuri
2021-11-02 11:17 ` De Lara Guarch, Pablo
0 siblings, 1 reply; 14+ messages in thread
From: Vidya Sagar Velumuri @ 2021-11-02 4:40 UTC (permalink / raw)
To: De Lara Guarch, Pablo, Ankur Dwivedi, Anoob Joseph,
Tejasree Kondoj, Nithin Kumar Dabilpuram, Akhil Goyal, Doherty,
Declan
Cc: dev
Hi Pablo,
We verified vectors mentioned in below link in our platform and all the vectors passed (i.e: the digest matches with the doc).
http://www.is.cas.cn/ztzl2016/zouchongzhi/201801/W020180126529970733243.pdf
The ZUC-256 Stream Cipher<http://www.is.cas.cn/ztzl2016/zouchongzhi/201801/W020180126529970733243.pdf>
The ZUC-256 Stream Cipher 5 3. X 2 = s 7L ks 5H 4. X 3 = s 2L ks 0H, where s iH is the high 16 bits of the cell s i and s jL is the low 16 bits of the cell s j. F(X 0;X 1;X 2) 1. W = (X 0 R 1) R 2 2. W 1 = R 1 X 1 3. W 2 = R 2 X 2 4. R 1 = S(L 1(W 1L kW 2H)) 5. R 2 = S(L 2(W 2L kW 1H)), where S = (S 0;S 1;S 0;S 1) is the 4 parallel S-boxes which are the same as those used in the previous ZUC ...
www.is.cas.cn
Could you please check if these vectors work in your platform.
Regards
Sagar
________________________________
From: Vidya Sagar Velumuri <vvelumuri@marvell.com>
Sent: 01 November 2021 15:53
To: De Lara Guarch, Pablo <pablo.de.lara.guarch@intel.com>; Ankur Dwivedi <adwivedi@marvell.com>; Anoob Joseph <anoobj@marvell.com>; Tejasree Kondoj <ktejasree@marvell.com>; Nithin Kumar Dabilpuram <ndabilpuram@marvell.com>; Akhil Goyal <gakhil@marvell.com>; Doherty, Declan <declan.doherty@intel.com>
Cc: dev@dpdk.org <dev@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH v1] test/crypto: fix: test vectors for zuc 256 bit key
Hi Pablo,
Verified with updated test vector. the output did not change from previous output but also, it did not match the ouput present in the vector.
Regards
Sagar
________________________________
From: De Lara Guarch, Pablo <pablo.de.lara.guarch@intel.com>
Sent: 01 November 2021 03:36
To: Vidya Sagar Velumuri <vvelumuri@marvell.com>; Ankur Dwivedi <adwivedi@marvell.com>; Anoob Joseph <anoobj@marvell.com>; Tejasree Kondoj <ktejasree@marvell.com>; Nithin Kumar Dabilpuram <ndabilpuram@marvell.com>; Akhil Goyal <gakhil@marvell.com>; Doherty, Declan <declan.doherty@intel.com>
Cc: dev@dpdk.org <dev@dpdk.org>
Subject: [EXT] RE: [dpdk-dev] [PATCH v1] test/crypto: fix: test vectors for zuc 256 bit key
External Email
________________________________
Hi Sagar,
Thanks for flagging this. I submitted a patch fixing the IV of the test vectors I pushed (it didn’t change the output):
http://patches.dpdk.org/project/dpdk/patch/20211031220421.52181-1-pablo.de.lara.guarch@intel.com/<https://urldefense.proofpoint.com/v2/url?u=http-3A__patches.dpdk.org_project_dpdk_patch_20211031220421.52181-2D1-2Dpablo.de.lara.guarch-40intel.com_&d=DwMFAg&c=nKjWec2b6R0mOyPaz7xtfQ&r=9VCCg7VNdg-jfzaFw1fN59x7Py9yM-ofwvekNj6MPxM&m=2eElny5n4QewacnppQimeCdeyB6B6GXxfdF4oet4KAlTXpwgcfhUF0Z3q2Ph4evt&s=pputaMk4g9cVhsjiJ1euKMLuGx24bIVTDh0AA4WrKwI&e=>
Could you check if they work for you?
Thanks,
Pablo
From: Vidya Sagar Velumuri <vvelumuri@marvell.com>
Sent: Saturday, October 30, 2021 1:26 PM
To: De Lara Guarch, Pablo <pablo.de.lara.guarch@intel.com>; Ankur Dwivedi <adwivedi@marvell.com>; Anoob Joseph <anoobj@marvell.com>; Tejasree Kondoj <ktejasree@marvell.com>; Nithin Kumar Dabilpuram <ndabilpuram@marvell.com>; Akhil Goyal <gakhil@marvell.com>; Doherty, Declan <declan.doherty@intel.com>
Cc: dev@dpdk.org
Subject: Re: [dpdk-dev] [PATCH v1] test/crypto: fix: test vectors for zuc 256 bit key
Hi Pablo,
Tried the test vector zuc256_test_case_auth_1 and the digest did not match with the generated digest in our platform.
As per spec, IV[i] for i = 17 to\x14 24 are 6-bit string occupying the 6 least signi cant bits of a byte.
But in the vectors, The values in the IV(byte -17 to 24) are > 0x3f.
Could you please elaborate how these bytes are considered for generation of digest.
Regards
Sagar
________________________________
From: De Lara Guarch, Pablo <pablo.de.lara.guarch@intel.com<mailto:pablo.de.lara.guarch@intel.com>>
Sent: 29 October 2021 18:07
To: Vidya Sagar Velumuri <vvelumuri@marvell.com<mailto:vvelumuri@marvell.com>>; Ankur Dwivedi <adwivedi@marvell.com<mailto:adwivedi@marvell.com>>; Anoob Joseph <anoobj@marvell.com<mailto:anoobj@marvell.com>>; Tejasree Kondoj <ktejasree@marvell.com<mailto:ktejasree@marvell.com>>; Nithin Kumar Dabilpuram <ndabilpuram@marvell.com<mailto:ndabilpuram@marvell.com>>; Akhil Goyal <gakhil@marvell.com<mailto:gakhil@marvell.com>>; Doherty, Declan <declan.doherty@intel.com<mailto:declan.doherty@intel.com>>
Cc: dev@dpdk.org<mailto:dev@dpdk.org> <dev@dpdk.org<mailto:dev@dpdk.org>>
Subject: [EXT] RE: [dpdk-dev] [PATCH v1] test/crypto: fix: test vectors for zuc 256 bit key
External Email
----------------------------------------------------------------------
Hi Vidya,
> -----Original Message-----
> From: dev <dev-bounces@dpdk.org<mailto:dev-bounces@dpdk.org>> On Behalf Of Vidya Sagar Velumuri
> Sent: Wednesday, October 27, 2021 9:41 AM
> To: adwivedi@marvell.com<mailto:adwivedi@marvell.com>; anoobj@marvell.com<mailto:anoobj@marvell.com>; ktejasree@marvell.com<mailto:ktejasree@marvell.com>;
> ndabilpuram@marvell.com<mailto:ndabilpuram@marvell.com>; gakhil@marvell.com<mailto:gakhil@marvell.com>; Doherty, Declan
> <declan.doherty@intel.com<mailto:declan.doherty@intel.com>>
> Cc: dev@dpdk.org<mailto:dev@dpdk.org>
> Subject: [dpdk-dev] [PATCH v1] test/crypto: fix: test vectors for zuc 256 bit key
>
> Fix the IV and MAC in the test vectors added for zuc 256-bit key
>
> Fixes: fa5bf9345d4e (test/crypto: add ZUC cases with 256-bit keys)
>
> Signed-off-by: Vidya Sagar Velumuri <vvelumuri@marvell.com<mailto:vvelumuri@marvell.com>>
The new vectors are failing for us. Could you check if the ones we added work for you?
Thanks,
Pablo
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [dpdk-dev] [PATCH v1] test/crypto: fix: test vectors for zuc 256 bit key
2021-11-02 4:40 ` Vidya Sagar Velumuri
@ 2021-11-02 11:17 ` De Lara Guarch, Pablo
0 siblings, 0 replies; 14+ messages in thread
From: De Lara Guarch, Pablo @ 2021-11-02 11:17 UTC (permalink / raw)
To: Vidya Sagar Velumuri, Ankur Dwivedi, Anoob Joseph,
Tejasree Kondoj, Nithin Kumar Dabilpuram, Akhil Goyal, Doherty,
Declan
Cc: dev
Hi Sagar,
Yes, those vectors pass for us too.
From our vectors, the ones for encryption (zuc256_test_case_cipher_1 and zuc256_test_case_cipher_2) work for you, and only the authentication one (zuc256_test_case_auth_1) doesn't?
Since verifying authentication is more difficult, we should try to cross check encryption, mainly check if we are generating the same keystream.
Could you change the plaintext of your encryption test vector (zuc_test_case_cipher_800b_key_256b ) to all 0s, and see which ciphertext you see
(will be the keystream generated by your device).
Our implementation actually matches with GmSSL library, so it looks like you might have some issue in yours, but let's see.
Thanks,
Pablo
From: Vidya Sagar Velumuri <vvelumuri@marvell.com>
Sent: Tuesday, November 2, 2021 4:41 AM
To: De Lara Guarch, Pablo <pablo.de.lara.guarch@intel.com>; Ankur Dwivedi <adwivedi@marvell.com>; Anoob Joseph <anoobj@marvell.com>; Tejasree Kondoj <ktejasree@marvell.com>; Nithin Kumar Dabilpuram <ndabilpuram@marvell.com>; Akhil Goyal <gakhil@marvell.com>; Doherty, Declan <declan.doherty@intel.com>
Cc: dev@dpdk.org
Subject: Re: [dpdk-dev] [PATCH v1] test/crypto: fix: test vectors for zuc 256 bit key
Hi Pablo,
We verified vectors mentioned in below link in our platform and all the vectors passed (i.e: the digest matches with the doc).
http://www.is.cas.cn/ztzl2016/zouchongzhi/201801/W020180126529970733243.pdf
The ZUC-256 Stream Cipher<http://www.is.cas.cn/ztzl2016/zouchongzhi/201801/W020180126529970733243.pdf>
The ZUC-256 Stream Cipher 5 3. X 2 = s 7L ks 5H 4. X 3 = s 2L ks 0H, where s iH is the high 16 bits of the cell s i and s jL is the low 16 bits of the cell s j. F(X 0;X 1;X 2) 1. W = (X 0 R 1) R 2 2. W 1 = R 1 X 1 3. W 2 = R 2 X 2 4. R 1 = S(L 1(W 1L kW 2H)) 5. R 2 = S(L 2(W 2L kW 1H)), where S = (S 0;S 1;S 0;S 1) is the 4 parallel S-boxes which are the same as those used in the previous ZUC ...
www.is.cas.cn<http://www.is.cas.cn>
Could you please check if these vectors work in your platform.
Regards
Sagar
________________________________
From: Vidya Sagar Velumuri <vvelumuri@marvell.com<mailto:vvelumuri@marvell.com>>
Sent: 01 November 2021 15:53
To: De Lara Guarch, Pablo <pablo.de.lara.guarch@intel.com<mailto:pablo.de.lara.guarch@intel.com>>; Ankur Dwivedi <adwivedi@marvell.com<mailto:adwivedi@marvell.com>>; Anoob Joseph <anoobj@marvell.com<mailto:anoobj@marvell.com>>; Tejasree Kondoj <ktejasree@marvell.com<mailto:ktejasree@marvell.com>>; Nithin Kumar Dabilpuram <ndabilpuram@marvell.com<mailto:ndabilpuram@marvell.com>>; Akhil Goyal <gakhil@marvell.com<mailto:gakhil@marvell.com>>; Doherty, Declan <declan.doherty@intel.com<mailto:declan.doherty@intel.com>>
Cc: dev@dpdk.org<mailto:dev@dpdk.org> <dev@dpdk.org<mailto:dev@dpdk.org>>
Subject: Re: [dpdk-dev] [PATCH v1] test/crypto: fix: test vectors for zuc 256 bit key
Hi Pablo,
Verified with updated test vector. the output did not change from previous output but also, it did not match the ouput present in the vector.
Regards
Sagar
________________________________
From: De Lara Guarch, Pablo <pablo.de.lara.guarch@intel.com<mailto:pablo.de.lara.guarch@intel.com>>
Sent: 01 November 2021 03:36
To: Vidya Sagar Velumuri <vvelumuri@marvell.com<mailto:vvelumuri@marvell.com>>; Ankur Dwivedi <adwivedi@marvell.com<mailto:adwivedi@marvell.com>>; Anoob Joseph <anoobj@marvell.com<mailto:anoobj@marvell.com>>; Tejasree Kondoj <ktejasree@marvell.com<mailto:ktejasree@marvell.com>>; Nithin Kumar Dabilpuram <ndabilpuram@marvell.com<mailto:ndabilpuram@marvell.com>>; Akhil Goyal <gakhil@marvell.com<mailto:gakhil@marvell.com>>; Doherty, Declan <declan.doherty@intel.com<mailto:declan.doherty@intel.com>>
Cc: dev@dpdk.org<mailto:dev@dpdk.org> <dev@dpdk.org<mailto:dev@dpdk.org>>
Subject: [EXT] RE: [dpdk-dev] [PATCH v1] test/crypto: fix: test vectors for zuc 256 bit key
External Email
________________________________
Hi Sagar,
Thanks for flagging this. I submitted a patch fixing the IV of the test vectors I pushed (it didn't change the output):
http://patches.dpdk.org/project/dpdk/patch/20211031220421.52181-1-pablo.de.lara.guarch@intel.com/<https://urldefense.proofpoint.com/v2/url?u=http-3A__patches.dpdk.org_project_dpdk_patch_20211031220421.52181-2D1-2Dpablo.de.lara.guarch-40intel.com_&d=DwMFAg&c=nKjWec2b6R0mOyPaz7xtfQ&r=9VCCg7VNdg-jfzaFw1fN59x7Py9yM-ofwvekNj6MPxM&m=2eElny5n4QewacnppQimeCdeyB6B6GXxfdF4oet4KAlTXpwgcfhUF0Z3q2Ph4evt&s=pputaMk4g9cVhsjiJ1euKMLuGx24bIVTDh0AA4WrKwI&e=>
Could you check if they work for you?
Thanks,
Pablo
From: Vidya Sagar Velumuri <vvelumuri@marvell.com<mailto:vvelumuri@marvell.com>>
Sent: Saturday, October 30, 2021 1:26 PM
To: De Lara Guarch, Pablo <pablo.de.lara.guarch@intel.com<mailto:pablo.de.lara.guarch@intel.com>>; Ankur Dwivedi <adwivedi@marvell.com<mailto:adwivedi@marvell.com>>; Anoob Joseph <anoobj@marvell.com<mailto:anoobj@marvell.com>>; Tejasree Kondoj <ktejasree@marvell.com<mailto:ktejasree@marvell.com>>; Nithin Kumar Dabilpuram <ndabilpuram@marvell.com<mailto:ndabilpuram@marvell.com>>; Akhil Goyal <gakhil@marvell.com<mailto:gakhil@marvell.com>>; Doherty, Declan <declan.doherty@intel.com<mailto:declan.doherty@intel.com>>
Cc: dev@dpdk.org<mailto:dev@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH v1] test/crypto: fix: test vectors for zuc 256 bit key
Hi Pablo,
Tried the test vector zuc256_test_case_auth_1 and the digest did not match with the generated digest in our platform.
As per spec, IV[i] for i = 17 to\x14 24 are 6-bit string occupying the 6 least signi cant bits of a byte.
But in the vectors, The values in the IV(byte -17 to 24) are > 0x3f.
Could you please elaborate how these bytes are considered for generation of digest.
Regards
Sagar
________________________________
From: De Lara Guarch, Pablo <pablo.de.lara.guarch@intel.com<mailto:pablo.de.lara.guarch@intel.com>>
Sent: 29 October 2021 18:07
To: Vidya Sagar Velumuri <vvelumuri@marvell.com<mailto:vvelumuri@marvell.com>>; Ankur Dwivedi <adwivedi@marvell.com<mailto:adwivedi@marvell.com>>; Anoob Joseph <anoobj@marvell.com<mailto:anoobj@marvell.com>>; Tejasree Kondoj <ktejasree@marvell.com<mailto:ktejasree@marvell.com>>; Nithin Kumar Dabilpuram <ndabilpuram@marvell.com<mailto:ndabilpuram@marvell.com>>; Akhil Goyal <gakhil@marvell.com<mailto:gakhil@marvell.com>>; Doherty, Declan <declan.doherty@intel.com<mailto:declan.doherty@intel.com>>
Cc: dev@dpdk.org<mailto:dev@dpdk.org> <dev@dpdk.org<mailto:dev@dpdk.org>>
Subject: [EXT] RE: [dpdk-dev] [PATCH v1] test/crypto: fix: test vectors for zuc 256 bit key
External Email
----------------------------------------------------------------------
Hi Vidya,
> -----Original Message-----
> From: dev <dev-bounces@dpdk.org<mailto:dev-bounces@dpdk.org>> On Behalf Of Vidya Sagar Velumuri
> Sent: Wednesday, October 27, 2021 9:41 AM
> To: adwivedi@marvell.com<mailto:adwivedi@marvell.com>; anoobj@marvell.com<mailto:anoobj@marvell.com>; ktejasree@marvell.com<mailto:ktejasree@marvell.com>;
> ndabilpuram@marvell.com<mailto:ndabilpuram@marvell.com>; gakhil@marvell.com<mailto:gakhil@marvell.com>; Doherty, Declan
> <declan.doherty@intel.com<mailto:declan.doherty@intel.com>>
> Cc: dev@dpdk.org<mailto:dev@dpdk.org>
> Subject: [dpdk-dev] [PATCH v1] test/crypto: fix: test vectors for zuc 256 bit key
>
> Fix the IV and MAC in the test vectors added for zuc 256-bit key
>
> Fixes: fa5bf9345d4e (test/crypto: add ZUC cases with 256-bit keys)
>
> Signed-off-by: Vidya Sagar Velumuri <vvelumuri@marvell.com<mailto:vvelumuri@marvell.com>>
The new vectors are failing for us. Could you check if the ones we added work for you?
Thanks,
Pablo
^ permalink raw reply [flat|nested] 14+ messages in thread
* [dpdk-dev] [PATCH v2] test/crypto: fix: test vectors for zuc 256 bit key
2021-10-27 8:40 [dpdk-dev] [PATCH v1] test/crypto: fix: test vectors for zuc 256 bit key Vidya Sagar Velumuri
2021-10-28 7:10 ` Akhil Goyal
2021-10-29 12:37 ` De Lara Guarch, Pablo
@ 2021-11-03 6:55 ` Vidya Sagar Velumuri
2021-11-03 9:28 ` De Lara Guarch, Pablo
2021-11-03 9:31 ` [dpdk-dev] [PATCH v3] " Vidya Sagar Velumuri
2 siblings, 2 replies; 14+ messages in thread
From: Vidya Sagar Velumuri @ 2021-11-03 6:55 UTC (permalink / raw)
To: adwivedi, anoobj, ktejasree, ndabilpuram, gakhil, roy.fan.zhang; +Cc: dev
Fix the test vectors added for zuc 256-bit key
Add known vectores form ZUC 256 RFC.
Fixes: fa5bf9345d4e (test/crypto: add ZUC cases with 256-bit keys)
Signed-off-by: Vidya Sagar Velumuri <vvelumuri@marvell.com>
diff --git a/app/test/test_cryptodev.c b/app/test/test_cryptodev.c
index 814a0b401d..38bbd6274b 100644
--- a/app/test/test_cryptodev.c
+++ b/app/test/test_cryptodev.c
@@ -7116,12 +7116,6 @@ test_zuc_encryption_test_case_6_sgl(void)
return test_zuc_encryption_sgl(&zuc_test_case_cipher_193b);
}
-static int
-test_zuc_encryption_test_case_7(void)
-{
- return test_zuc_encryption(&zuc_test_case_cipher_800b_key_256b);
-}
-
static int
test_zuc_hash_generate_test_case_1(void)
{
@@ -7173,13 +7167,19 @@ test_zuc_hash_generate_test_case_8(void)
static int
test_zuc_hash_generate_test_case_9(void)
{
- return test_zuc_authentication(&zuc_test_case_auth_584b_mac_64b);
+ return test_zuc_authentication(&zuc_test_case_auth_4000b_mac_32b);
}
static int
test_zuc_hash_generate_test_case_10(void)
{
- return test_zuc_authentication(&zuc_test_case_auth_2080b_mac_128b);
+ return test_zuc_authentication(&zuc_test_case_auth_4000b_mac_64b);
+}
+
+static int
+test_zuc_hash_generate_test_case_11(void)
+{
+ return test_zuc_authentication(&zuc_test_case_auth_4000b_mac_128b);
}
static int
@@ -14934,8 +14934,6 @@ static struct unit_test_suite cryptodev_zuc_testsuite = {
test_zuc_encryption_test_case_5),
TEST_CASE_ST(ut_setup, ut_teardown,
test_zuc_encryption_test_case_6_sgl),
- TEST_CASE_ST(ut_setup, ut_teardown,
- test_zuc_encryption_test_case_7),
/** ZUC authenticate (EIA3) */
TEST_CASE_ST(ut_setup, ut_teardown,
@@ -14958,6 +14956,8 @@ static struct unit_test_suite cryptodev_zuc_testsuite = {
test_zuc_hash_generate_test_case_9),
TEST_CASE_ST(ut_setup, ut_teardown,
test_zuc_hash_generate_test_case_10),
+ TEST_CASE_ST(ut_setup, ut_teardown,
+ test_zuc_hash_generate_test_case_11),
/** ZUC alg-chain (EEA3/EIA3) */
diff --git a/app/test/test_cryptodev_zuc_test_vectors.h b/app/test/test_cryptodev_zuc_test_vectors.h
index 35bbe0f6c4..90f353cced 100644
--- a/app/test/test_cryptodev_zuc_test_vectors.h
+++ b/app/test/test_cryptodev_zuc_test_vectors.h
@@ -517,68 +517,6 @@ static struct wireless_test_data zuc_test_case_cipher_4019b = {
}
};
-static struct wireless_test_data zuc_test_case_cipher_800b_key_256b = {
- .key = {
- .data = {
- 0xE5, 0xBD, 0x3E, 0xA0, 0xEB, 0x55, 0xAD, 0xE8,
- 0x66, 0xC6, 0xAC, 0x58, 0xBD, 0x54, 0x30, 0x2A,
- 0xE5, 0xBD, 0x3E, 0xA0, 0xEB, 0x55, 0xAD, 0xE8,
- 0x66, 0xC6, 0xAC, 0x58, 0xBD, 0x54, 0x30, 0x2A
- },
- .len = 32
- },
- .cipher_iv = {
- .data = {
- 0x00, 0x05, 0x68, 0x23, 0xC4, 0x00, 0x00, 0x00,
- 0x00, 0x05, 0x68, 0x23, 0xC4, 0x00, 0x00, 0x00,
- 0x00, 0x05, 0x68, 0x23, 0xC4, 0x00, 0x00, 0x00
- },
- .len = 24
- },
- .plaintext = {
- .data = {
- 0x14, 0xA8, 0xEF, 0x69, 0x3D, 0x67, 0x85, 0x07,
- 0xBB, 0xE7, 0x27, 0x0A, 0x7F, 0x67, 0xFF, 0x50,
- 0x06, 0xC3, 0x52, 0x5B, 0x98, 0x07, 0xE4, 0x67,
- 0xC4, 0xE5, 0x60, 0x00, 0xBA, 0x33, 0x8F, 0x5D,
- 0x42, 0x95, 0x59, 0x03, 0x67, 0x51, 0x82, 0x22,
- 0x46, 0xC8, 0x0D, 0x3B, 0x38, 0xF0, 0x7F, 0x4B,
- 0xE2, 0xD8, 0xFF, 0x58, 0x05, 0xF5, 0x13, 0x22,
- 0x29, 0xBD, 0xE9, 0x3B, 0xBB, 0xDC, 0xAF, 0x38,
- 0x2B, 0xF1, 0xEE, 0x97, 0x2F, 0xBF, 0x99, 0x77,
- 0xBA, 0xDA, 0x89, 0x45, 0x84, 0x7A, 0x2A, 0x6C,
- 0x9A, 0xD3, 0x4A, 0x66, 0x75, 0x54, 0xE0, 0x4D,
- 0x1F, 0x7F, 0xA2, 0xC3, 0x32, 0x41, 0xBD, 0x8F,
- 0x01, 0xBA, 0x22, 0x0D
- },
- .len = 800
- },
- .ciphertext = {
- .data = {
- 0xd0, 0xb4, 0x09, 0x5a, 0x83, 0xf3, 0x8d, 0x2a,
- 0x8a, 0xc1, 0x75, 0x5a, 0xed, 0x53, 0xd3, 0xc6,
- 0x15, 0x9d, 0x8c, 0x12, 0x98, 0x89, 0x66, 0x28,
- 0x05, 0xc8, 0xd1, 0xc4, 0xbf, 0xf7, 0x72, 0x79,
- 0xc7, 0x42, 0xde, 0xc8, 0xdc, 0xe9, 0xb4, 0x4a,
- 0x92, 0x85, 0x31, 0xb7, 0xc6, 0x51, 0x83, 0x0b,
- 0x96, 0x29, 0xdd, 0xe0, 0x3b, 0x7e, 0xbe, 0x7b,
- 0x34, 0x23, 0x1b, 0xe1, 0x8d, 0x8a, 0xe7, 0x0f,
- 0x12, 0x68, 0x41, 0x4e, 0xaa, 0xf0, 0xeb, 0x9d,
- 0xbf, 0xed, 0x00, 0xd9, 0x3c, 0x4d, 0x9a, 0xfb,
- 0x9c, 0xfe, 0xc7, 0xca, 0x3f, 0xd6, 0xbf, 0x03,
- 0x73, 0x67, 0xcc, 0xc2, 0x38, 0xa3, 0xe0, 0x6e,
- 0xe6, 0x4b, 0x63, 0x61
- },
- .len = 800
- },
- .validDataLenInBits = {
- .len = 800
- },
- .validCipherLenInBits = {
- .len = 800
- }
-};
-
static struct wireless_test_data zuc_test_case_cipher_200b_auth_200b = {
.key = {
.data = {
@@ -1108,114 +1046,116 @@ static struct wireless_test_data zuc_test_case_auth_584b = {
}
};
-static struct wireless_test_data zuc_test_case_auth_2080b_mac_128b = {
+static struct wireless_test_data zuc_test_case_auth_4000b_mac_128b = {
.key = {
.data = {
- 0xC8, 0xA4, 0x82, 0x62, 0xD0, 0xC2, 0xE2, 0xBA,
- 0xC4, 0xB9, 0x6E, 0xF7, 0x7E, 0x80, 0xCA, 0x59,
- 0xC8, 0xA4, 0x82, 0x62, 0xD0, 0xC2, 0xE2, 0xBA,
- 0xC4, 0xB9, 0x6E, 0xF7, 0x7E, 0x80, 0xCA, 0x59
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
},
.len = 32
},
.auth_iv = {
.data = {
- 0x05, 0x09, 0x78, 0x50, 0x80, 0x00, 0x00, 0x00,
- 0x85, 0x09, 0x78, 0x50, 0x80, 0x00, 0x80, 0x00,
- 0x85, 0x09, 0x78, 0x50, 0x80, 0x00, 0x80, 0x00
- },
- .len = 24
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+ 0x3f
+ },
+ .len = 25
},
.plaintext = {
.data = {
- 0xB5, 0x46, 0x43, 0x0B, 0xF8, 0x7B, 0x4F, 0x1E,
- 0xE8, 0x34, 0x70, 0x4C, 0xD6, 0x95, 0x1C, 0x36,
- 0xE2, 0x6F, 0x10, 0x8C, 0xF7, 0x31, 0x78, 0x8F,
- 0x48, 0xDC, 0x34, 0xF1, 0x67, 0x8C, 0x05, 0x22,
- 0x1C, 0x8F, 0xA7, 0xFF, 0x2F, 0x39, 0xF4, 0x77,
- 0xE7, 0xE4, 0x9E, 0xF6, 0x0A, 0x4E, 0xC2, 0xC3,
- 0xDE, 0x24, 0x31, 0x2A, 0x96, 0xAA, 0x26, 0xE1,
- 0xCF, 0xBA, 0x57, 0x56, 0x38, 0x38, 0xB2, 0x97,
- 0xF4, 0x7E, 0x85, 0x10, 0xC7, 0x79, 0xFD, 0x66,
- 0x54, 0xB1, 0x43, 0x38, 0x6F, 0xA6, 0x39, 0xD3,
- 0x1E, 0xDB, 0xD6, 0xC0, 0x6E, 0x47, 0xD1, 0x59,
- 0xD9, 0x43, 0x62, 0xF2, 0x6A, 0xEE, 0xED, 0xEE,
- 0x0E, 0x4F, 0x49, 0xD9, 0xBF, 0x84, 0x12, 0x99,
- 0x54, 0x15, 0xBF, 0xAD, 0x56, 0xEE, 0x82, 0xD1,
- 0xCA, 0x74, 0x63, 0xAB, 0xF0, 0x85, 0xB0, 0x82,
- 0xB0, 0x99, 0x04, 0xD6, 0xD9, 0x90, 0xD4, 0x3C,
- 0xF2, 0xE0, 0x62, 0xF4, 0x08, 0x39, 0xD9, 0x32,
- 0x48, 0xB1, 0xEB, 0x92, 0xCD, 0xFE, 0xD5, 0x30,
- 0x0B, 0xC1, 0x48, 0x28, 0x04, 0x30, 0xB6, 0xD0,
- 0xCA, 0xA0, 0x94, 0xB6, 0xEC, 0x89, 0x11, 0xAB,
- 0x7D, 0xC3, 0x68, 0x24, 0xB8, 0x24, 0xDC, 0x0A,
- 0xF6, 0x68, 0x2B, 0x09, 0x35, 0xFD, 0xE7, 0xB4,
- 0x92, 0xA1, 0x4D, 0xC2, 0xF4, 0x36, 0x48, 0x03,
- 0x8D, 0xA2, 0xCF, 0x79, 0x17, 0x0D, 0x2D, 0x50,
- 0x13, 0x3F, 0xD4, 0x94, 0x16, 0xCB, 0x6E, 0x33,
- 0xBE, 0xA9, 0x0B, 0x8B, 0xF4, 0x55, 0x9B, 0x03,
- 0x73, 0x2A, 0x01, 0xEA, 0x29, 0x0E, 0x6D, 0x07,
- 0x4F, 0x79, 0xBB, 0x83, 0xC1, 0x0E, 0x58, 0x00,
- 0x15, 0xCC, 0x1A, 0x85, 0xB3, 0x6B, 0x55, 0x01,
- 0x04, 0x6E, 0x9C, 0x4B, 0xDC, 0xAE, 0x51, 0x35,
- 0x69, 0x0B, 0x86, 0x66, 0xBD, 0x54, 0xB7, 0xA7,
- 0x03, 0xEA, 0x7B, 0x6F, 0x22, 0x0A, 0x54, 0x69,
- 0xA5, 0x68, 0x02, 0x7E
+ [0 ... 499] = 0x11,
},
- .len = 2080
+ .len = 4000
},
.validAuthLenInBits = {
- .len = 2080
+ .len = 4000
},
.digest = {
- .data = {0x05, 0x9f, 0xd8, 0x21, 0x90, 0xfb, 0x13, 0x26,
- 0x94, 0x37, 0x6d, 0xc0, 0xcc, 0x52, 0xb9, 0xcc},
+ .data = {
+ 0x3a, 0x83, 0xb5, 0x54, 0xbe, 0x40, 0x8c, 0xa5,
+ 0x49, 0x41, 0x24, 0xed, 0x9d, 0x47, 0x32, 0x05
+ },
.len = 16
}
};
-static struct wireless_test_data zuc_test_case_auth_584b_mac_64b = {
+static struct wireless_test_data zuc_test_case_auth_4000b_mac_64b = {
.key = {
.data = {
- 0xc9, 0xe6, 0xce, 0xc4, 0x60, 0x7c, 0x72, 0xdb,
- 0x00, 0x0a, 0xef, 0xa8, 0x83, 0x85, 0xab, 0x0a,
- 0xc9, 0xe6, 0xce, 0xc4, 0x60, 0x7c, 0x72, 0xdb,
- 0x00, 0x0a, 0xef, 0xa8, 0x83, 0x85, 0xab, 0x0a
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
},
.len = 32
},
.auth_iv = {
.data = {
- 0xa9, 0x40, 0x59, 0xda, 0x50, 0x0, 0x0, 0x0,
- 0x29, 0x40, 0x59, 0xda, 0x50, 0x0, 0x80, 0x0,
- 0x29, 0x40, 0x59, 0xda, 0x50, 0x0, 0x80, 0x0
- },
- .len = 24
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+ 0x3f
+ },
+ .len = 25
},
.plaintext = {
.data = {
- 0x98, 0x3b, 0x41, 0xd4, 0x7d, 0x78, 0x0c, 0x9e,
- 0x1a, 0xd1, 0x1d, 0x7e, 0xb7, 0x03, 0x91, 0xb1,
- 0xde, 0x0b, 0x35, 0xda, 0x2d, 0xc6, 0x2f, 0x83,
- 0xe7, 0xb7, 0x8d, 0x63, 0x06, 0xca, 0x0e, 0xa0,
- 0x7e, 0x94, 0x1b, 0x7b, 0xe9, 0x13, 0x48, 0xf9,
- 0xfc, 0xb1, 0x70, 0xe2, 0x21, 0x7f, 0xec, 0xd9,
- 0x7f, 0x9f, 0x68, 0xad, 0xb1, 0x6e, 0x5d, 0x7d,
- 0x21, 0xe5, 0x69, 0xd2, 0x80, 0xed, 0x77, 0x5c,
- 0xeb, 0xde, 0x3f, 0x40, 0x93, 0xc5, 0x38, 0x81,
- 0x00, 0x00, 0x00, 0x00
+ [0 ... 499] = 0x11,
},
- .len = 584
+ .len = 4000
},
.validAuthLenInBits = {
- .len = 584
+ .len = 4000
},
.digest = {
- .data = {0xf5, 0x45, 0x4a, 0x75, 0x22, 0x39, 0x4b, 0xf2},
+ .data = {
+ 0xea, 0x1d, 0xee, 0x54, 0x4b, 0xb6, 0x22, 0x3b
+ },
.len = 8
}
};
+static struct wireless_test_data zuc_test_case_auth_4000b_mac_32b = {
+ .key = {
+ .data = {
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ },
+ .len = 32
+ },
+ .auth_iv = {
+ .data = {
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+ 0x3f
+ },
+ .len = 25
+ },
+ .plaintext = {
+ .data = {
+ [0 ... 499] = 0x11,
+ },
+ .len = 4000
+ },
+ .validAuthLenInBits = {
+ .len = 4000
+ },
+ .digest = {
+ .data = {
+ 0x5c, 0x7c, 0x8b, 0x88
+ },
+ .len = 4
+ }
+};
+
+
struct wireless_test_data zuc_auth_cipher_test_case_1 = {
.key = {
.data = {
--
2.31.1
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [dpdk-dev] [PATCH v2] test/crypto: fix: test vectors for zuc 256 bit key
2021-11-03 6:55 ` [dpdk-dev] [PATCH v2] " Vidya Sagar Velumuri
@ 2021-11-03 9:28 ` De Lara Guarch, Pablo
2021-11-03 9:31 ` [dpdk-dev] [PATCH v3] " Vidya Sagar Velumuri
1 sibling, 0 replies; 14+ messages in thread
From: De Lara Guarch, Pablo @ 2021-11-03 9:28 UTC (permalink / raw)
To: Vidya Sagar Velumuri, adwivedi, anoobj, ktejasree, ndabilpuram,
gakhil, Zhang, Roy Fan
Cc: dev
Hi Sagar,
> -----Original Message-----
> From: dev <dev-bounces@dpdk.org> On Behalf Of Vidya Sagar Velumuri
> Sent: Wednesday, November 3, 2021 6:55 AM
> To: adwivedi@marvell.com; anoobj@marvell.com; ktejasree@marvell.com;
> ndabilpuram@marvell.com; gakhil@marvell.com; Zhang, Roy Fan
> <roy.fan.zhang@intel.com>
> Cc: dev@dpdk.org
> Subject: [dpdk-dev] [PATCH v2] test/crypto: fix: test vectors for zuc 256 bit key
>
> Fix the test vectors added for zuc 256-bit key Add known vectores form ZUC 256
> RFC.
>
> Fixes: fa5bf9345d4e (test/crypto: add ZUC cases with 256-bit keys)
>
> Signed-off-by: Vidya Sagar Velumuri <vvelumuri@marvell.com>
Thanks for these new vectors. Looks like they pass for us. However, I notice that your driver still has 24-byte IV capability for ZUC,
instead of 25 bytes. Is this OK for you? I added some code to check if the IV of a test vector is supported by a device.
Thanks,
Pablo
^ permalink raw reply [flat|nested] 14+ messages in thread
* [dpdk-dev] [PATCH v3] test/crypto: fix: test vectors for zuc 256 bit key
2021-11-03 6:55 ` [dpdk-dev] [PATCH v2] " Vidya Sagar Velumuri
2021-11-03 9:28 ` De Lara Guarch, Pablo
@ 2021-11-03 9:31 ` Vidya Sagar Velumuri
2021-11-04 10:52 ` Akhil Goyal
1 sibling, 1 reply; 14+ messages in thread
From: Vidya Sagar Velumuri @ 2021-11-03 9:31 UTC (permalink / raw)
To: adwivedi, anoobj, ktejasree, ndabilpuram, gakhil, roy.fan.zhang; +Cc: dev
Fix the test vectors added for zuc 256-bit key
Add known vectors form ZUC 256 RFC.
Fixes: fa5bf9345d4e (test/crypto: add ZUC cases with 256-bit keys)
Signed-off-by: Vidya Sagar Velumuri <vvelumuri@marvell.com>
v3:
* Fixed spell check
diff --git a/app/test/test_cryptodev.c b/app/test/test_cryptodev.c
index 814a0b401d..38bbd6274b 100644
--- a/app/test/test_cryptodev.c
+++ b/app/test/test_cryptodev.c
@@ -7116,12 +7116,6 @@ test_zuc_encryption_test_case_6_sgl(void)
return test_zuc_encryption_sgl(&zuc_test_case_cipher_193b);
}
-static int
-test_zuc_encryption_test_case_7(void)
-{
- return test_zuc_encryption(&zuc_test_case_cipher_800b_key_256b);
-}
-
static int
test_zuc_hash_generate_test_case_1(void)
{
@@ -7173,13 +7167,19 @@ test_zuc_hash_generate_test_case_8(void)
static int
test_zuc_hash_generate_test_case_9(void)
{
- return test_zuc_authentication(&zuc_test_case_auth_584b_mac_64b);
+ return test_zuc_authentication(&zuc_test_case_auth_4000b_mac_32b);
}
static int
test_zuc_hash_generate_test_case_10(void)
{
- return test_zuc_authentication(&zuc_test_case_auth_2080b_mac_128b);
+ return test_zuc_authentication(&zuc_test_case_auth_4000b_mac_64b);
+}
+
+static int
+test_zuc_hash_generate_test_case_11(void)
+{
+ return test_zuc_authentication(&zuc_test_case_auth_4000b_mac_128b);
}
static int
@@ -14934,8 +14934,6 @@ static struct unit_test_suite cryptodev_zuc_testsuite = {
test_zuc_encryption_test_case_5),
TEST_CASE_ST(ut_setup, ut_teardown,
test_zuc_encryption_test_case_6_sgl),
- TEST_CASE_ST(ut_setup, ut_teardown,
- test_zuc_encryption_test_case_7),
/** ZUC authenticate (EIA3) */
TEST_CASE_ST(ut_setup, ut_teardown,
@@ -14958,6 +14956,8 @@ static struct unit_test_suite cryptodev_zuc_testsuite = {
test_zuc_hash_generate_test_case_9),
TEST_CASE_ST(ut_setup, ut_teardown,
test_zuc_hash_generate_test_case_10),
+ TEST_CASE_ST(ut_setup, ut_teardown,
+ test_zuc_hash_generate_test_case_11),
/** ZUC alg-chain (EEA3/EIA3) */
diff --git a/app/test/test_cryptodev_zuc_test_vectors.h b/app/test/test_cryptodev_zuc_test_vectors.h
index 35bbe0f6c4..90f353cced 100644
--- a/app/test/test_cryptodev_zuc_test_vectors.h
+++ b/app/test/test_cryptodev_zuc_test_vectors.h
@@ -517,68 +517,6 @@ static struct wireless_test_data zuc_test_case_cipher_4019b = {
}
};
-static struct wireless_test_data zuc_test_case_cipher_800b_key_256b = {
- .key = {
- .data = {
- 0xE5, 0xBD, 0x3E, 0xA0, 0xEB, 0x55, 0xAD, 0xE8,
- 0x66, 0xC6, 0xAC, 0x58, 0xBD, 0x54, 0x30, 0x2A,
- 0xE5, 0xBD, 0x3E, 0xA0, 0xEB, 0x55, 0xAD, 0xE8,
- 0x66, 0xC6, 0xAC, 0x58, 0xBD, 0x54, 0x30, 0x2A
- },
- .len = 32
- },
- .cipher_iv = {
- .data = {
- 0x00, 0x05, 0x68, 0x23, 0xC4, 0x00, 0x00, 0x00,
- 0x00, 0x05, 0x68, 0x23, 0xC4, 0x00, 0x00, 0x00,
- 0x00, 0x05, 0x68, 0x23, 0xC4, 0x00, 0x00, 0x00
- },
- .len = 24
- },
- .plaintext = {
- .data = {
- 0x14, 0xA8, 0xEF, 0x69, 0x3D, 0x67, 0x85, 0x07,
- 0xBB, 0xE7, 0x27, 0x0A, 0x7F, 0x67, 0xFF, 0x50,
- 0x06, 0xC3, 0x52, 0x5B, 0x98, 0x07, 0xE4, 0x67,
- 0xC4, 0xE5, 0x60, 0x00, 0xBA, 0x33, 0x8F, 0x5D,
- 0x42, 0x95, 0x59, 0x03, 0x67, 0x51, 0x82, 0x22,
- 0x46, 0xC8, 0x0D, 0x3B, 0x38, 0xF0, 0x7F, 0x4B,
- 0xE2, 0xD8, 0xFF, 0x58, 0x05, 0xF5, 0x13, 0x22,
- 0x29, 0xBD, 0xE9, 0x3B, 0xBB, 0xDC, 0xAF, 0x38,
- 0x2B, 0xF1, 0xEE, 0x97, 0x2F, 0xBF, 0x99, 0x77,
- 0xBA, 0xDA, 0x89, 0x45, 0x84, 0x7A, 0x2A, 0x6C,
- 0x9A, 0xD3, 0x4A, 0x66, 0x75, 0x54, 0xE0, 0x4D,
- 0x1F, 0x7F, 0xA2, 0xC3, 0x32, 0x41, 0xBD, 0x8F,
- 0x01, 0xBA, 0x22, 0x0D
- },
- .len = 800
- },
- .ciphertext = {
- .data = {
- 0xd0, 0xb4, 0x09, 0x5a, 0x83, 0xf3, 0x8d, 0x2a,
- 0x8a, 0xc1, 0x75, 0x5a, 0xed, 0x53, 0xd3, 0xc6,
- 0x15, 0x9d, 0x8c, 0x12, 0x98, 0x89, 0x66, 0x28,
- 0x05, 0xc8, 0xd1, 0xc4, 0xbf, 0xf7, 0x72, 0x79,
- 0xc7, 0x42, 0xde, 0xc8, 0xdc, 0xe9, 0xb4, 0x4a,
- 0x92, 0x85, 0x31, 0xb7, 0xc6, 0x51, 0x83, 0x0b,
- 0x96, 0x29, 0xdd, 0xe0, 0x3b, 0x7e, 0xbe, 0x7b,
- 0x34, 0x23, 0x1b, 0xe1, 0x8d, 0x8a, 0xe7, 0x0f,
- 0x12, 0x68, 0x41, 0x4e, 0xaa, 0xf0, 0xeb, 0x9d,
- 0xbf, 0xed, 0x00, 0xd9, 0x3c, 0x4d, 0x9a, 0xfb,
- 0x9c, 0xfe, 0xc7, 0xca, 0x3f, 0xd6, 0xbf, 0x03,
- 0x73, 0x67, 0xcc, 0xc2, 0x38, 0xa3, 0xe0, 0x6e,
- 0xe6, 0x4b, 0x63, 0x61
- },
- .len = 800
- },
- .validDataLenInBits = {
- .len = 800
- },
- .validCipherLenInBits = {
- .len = 800
- }
-};
-
static struct wireless_test_data zuc_test_case_cipher_200b_auth_200b = {
.key = {
.data = {
@@ -1108,114 +1046,116 @@ static struct wireless_test_data zuc_test_case_auth_584b = {
}
};
-static struct wireless_test_data zuc_test_case_auth_2080b_mac_128b = {
+static struct wireless_test_data zuc_test_case_auth_4000b_mac_128b = {
.key = {
.data = {
- 0xC8, 0xA4, 0x82, 0x62, 0xD0, 0xC2, 0xE2, 0xBA,
- 0xC4, 0xB9, 0x6E, 0xF7, 0x7E, 0x80, 0xCA, 0x59,
- 0xC8, 0xA4, 0x82, 0x62, 0xD0, 0xC2, 0xE2, 0xBA,
- 0xC4, 0xB9, 0x6E, 0xF7, 0x7E, 0x80, 0xCA, 0x59
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
},
.len = 32
},
.auth_iv = {
.data = {
- 0x05, 0x09, 0x78, 0x50, 0x80, 0x00, 0x00, 0x00,
- 0x85, 0x09, 0x78, 0x50, 0x80, 0x00, 0x80, 0x00,
- 0x85, 0x09, 0x78, 0x50, 0x80, 0x00, 0x80, 0x00
- },
- .len = 24
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+ 0x3f
+ },
+ .len = 25
},
.plaintext = {
.data = {
- 0xB5, 0x46, 0x43, 0x0B, 0xF8, 0x7B, 0x4F, 0x1E,
- 0xE8, 0x34, 0x70, 0x4C, 0xD6, 0x95, 0x1C, 0x36,
- 0xE2, 0x6F, 0x10, 0x8C, 0xF7, 0x31, 0x78, 0x8F,
- 0x48, 0xDC, 0x34, 0xF1, 0x67, 0x8C, 0x05, 0x22,
- 0x1C, 0x8F, 0xA7, 0xFF, 0x2F, 0x39, 0xF4, 0x77,
- 0xE7, 0xE4, 0x9E, 0xF6, 0x0A, 0x4E, 0xC2, 0xC3,
- 0xDE, 0x24, 0x31, 0x2A, 0x96, 0xAA, 0x26, 0xE1,
- 0xCF, 0xBA, 0x57, 0x56, 0x38, 0x38, 0xB2, 0x97,
- 0xF4, 0x7E, 0x85, 0x10, 0xC7, 0x79, 0xFD, 0x66,
- 0x54, 0xB1, 0x43, 0x38, 0x6F, 0xA6, 0x39, 0xD3,
- 0x1E, 0xDB, 0xD6, 0xC0, 0x6E, 0x47, 0xD1, 0x59,
- 0xD9, 0x43, 0x62, 0xF2, 0x6A, 0xEE, 0xED, 0xEE,
- 0x0E, 0x4F, 0x49, 0xD9, 0xBF, 0x84, 0x12, 0x99,
- 0x54, 0x15, 0xBF, 0xAD, 0x56, 0xEE, 0x82, 0xD1,
- 0xCA, 0x74, 0x63, 0xAB, 0xF0, 0x85, 0xB0, 0x82,
- 0xB0, 0x99, 0x04, 0xD6, 0xD9, 0x90, 0xD4, 0x3C,
- 0xF2, 0xE0, 0x62, 0xF4, 0x08, 0x39, 0xD9, 0x32,
- 0x48, 0xB1, 0xEB, 0x92, 0xCD, 0xFE, 0xD5, 0x30,
- 0x0B, 0xC1, 0x48, 0x28, 0x04, 0x30, 0xB6, 0xD0,
- 0xCA, 0xA0, 0x94, 0xB6, 0xEC, 0x89, 0x11, 0xAB,
- 0x7D, 0xC3, 0x68, 0x24, 0xB8, 0x24, 0xDC, 0x0A,
- 0xF6, 0x68, 0x2B, 0x09, 0x35, 0xFD, 0xE7, 0xB4,
- 0x92, 0xA1, 0x4D, 0xC2, 0xF4, 0x36, 0x48, 0x03,
- 0x8D, 0xA2, 0xCF, 0x79, 0x17, 0x0D, 0x2D, 0x50,
- 0x13, 0x3F, 0xD4, 0x94, 0x16, 0xCB, 0x6E, 0x33,
- 0xBE, 0xA9, 0x0B, 0x8B, 0xF4, 0x55, 0x9B, 0x03,
- 0x73, 0x2A, 0x01, 0xEA, 0x29, 0x0E, 0x6D, 0x07,
- 0x4F, 0x79, 0xBB, 0x83, 0xC1, 0x0E, 0x58, 0x00,
- 0x15, 0xCC, 0x1A, 0x85, 0xB3, 0x6B, 0x55, 0x01,
- 0x04, 0x6E, 0x9C, 0x4B, 0xDC, 0xAE, 0x51, 0x35,
- 0x69, 0x0B, 0x86, 0x66, 0xBD, 0x54, 0xB7, 0xA7,
- 0x03, 0xEA, 0x7B, 0x6F, 0x22, 0x0A, 0x54, 0x69,
- 0xA5, 0x68, 0x02, 0x7E
+ [0 ... 499] = 0x11,
},
- .len = 2080
+ .len = 4000
},
.validAuthLenInBits = {
- .len = 2080
+ .len = 4000
},
.digest = {
- .data = {0x05, 0x9f, 0xd8, 0x21, 0x90, 0xfb, 0x13, 0x26,
- 0x94, 0x37, 0x6d, 0xc0, 0xcc, 0x52, 0xb9, 0xcc},
+ .data = {
+ 0x3a, 0x83, 0xb5, 0x54, 0xbe, 0x40, 0x8c, 0xa5,
+ 0x49, 0x41, 0x24, 0xed, 0x9d, 0x47, 0x32, 0x05
+ },
.len = 16
}
};
-static struct wireless_test_data zuc_test_case_auth_584b_mac_64b = {
+static struct wireless_test_data zuc_test_case_auth_4000b_mac_64b = {
.key = {
.data = {
- 0xc9, 0xe6, 0xce, 0xc4, 0x60, 0x7c, 0x72, 0xdb,
- 0x00, 0x0a, 0xef, 0xa8, 0x83, 0x85, 0xab, 0x0a,
- 0xc9, 0xe6, 0xce, 0xc4, 0x60, 0x7c, 0x72, 0xdb,
- 0x00, 0x0a, 0xef, 0xa8, 0x83, 0x85, 0xab, 0x0a
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
},
.len = 32
},
.auth_iv = {
.data = {
- 0xa9, 0x40, 0x59, 0xda, 0x50, 0x0, 0x0, 0x0,
- 0x29, 0x40, 0x59, 0xda, 0x50, 0x0, 0x80, 0x0,
- 0x29, 0x40, 0x59, 0xda, 0x50, 0x0, 0x80, 0x0
- },
- .len = 24
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+ 0x3f
+ },
+ .len = 25
},
.plaintext = {
.data = {
- 0x98, 0x3b, 0x41, 0xd4, 0x7d, 0x78, 0x0c, 0x9e,
- 0x1a, 0xd1, 0x1d, 0x7e, 0xb7, 0x03, 0x91, 0xb1,
- 0xde, 0x0b, 0x35, 0xda, 0x2d, 0xc6, 0x2f, 0x83,
- 0xe7, 0xb7, 0x8d, 0x63, 0x06, 0xca, 0x0e, 0xa0,
- 0x7e, 0x94, 0x1b, 0x7b, 0xe9, 0x13, 0x48, 0xf9,
- 0xfc, 0xb1, 0x70, 0xe2, 0x21, 0x7f, 0xec, 0xd9,
- 0x7f, 0x9f, 0x68, 0xad, 0xb1, 0x6e, 0x5d, 0x7d,
- 0x21, 0xe5, 0x69, 0xd2, 0x80, 0xed, 0x77, 0x5c,
- 0xeb, 0xde, 0x3f, 0x40, 0x93, 0xc5, 0x38, 0x81,
- 0x00, 0x00, 0x00, 0x00
+ [0 ... 499] = 0x11,
},
- .len = 584
+ .len = 4000
},
.validAuthLenInBits = {
- .len = 584
+ .len = 4000
},
.digest = {
- .data = {0xf5, 0x45, 0x4a, 0x75, 0x22, 0x39, 0x4b, 0xf2},
+ .data = {
+ 0xea, 0x1d, 0xee, 0x54, 0x4b, 0xb6, 0x22, 0x3b
+ },
.len = 8
}
};
+static struct wireless_test_data zuc_test_case_auth_4000b_mac_32b = {
+ .key = {
+ .data = {
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ },
+ .len = 32
+ },
+ .auth_iv = {
+ .data = {
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+ 0x3f
+ },
+ .len = 25
+ },
+ .plaintext = {
+ .data = {
+ [0 ... 499] = 0x11,
+ },
+ .len = 4000
+ },
+ .validAuthLenInBits = {
+ .len = 4000
+ },
+ .digest = {
+ .data = {
+ 0x5c, 0x7c, 0x8b, 0x88
+ },
+ .len = 4
+ }
+};
+
+
struct wireless_test_data zuc_auth_cipher_test_case_1 = {
.key = {
.data = {
--
2.31.1
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [dpdk-dev] [PATCH v3] test/crypto: fix: test vectors for zuc 256 bit key
2021-11-03 9:31 ` [dpdk-dev] [PATCH v3] " Vidya Sagar Velumuri
@ 2021-11-04 10:52 ` Akhil Goyal
2021-11-04 12:18 ` De Lara Guarch, Pablo
0 siblings, 1 reply; 14+ messages in thread
From: Akhil Goyal @ 2021-11-04 10:52 UTC (permalink / raw)
To: Vidya Sagar Velumuri, Ankur Dwivedi, Anoob Joseph,
Tejasree Kondoj, Nithin Kumar Dabilpuram, roy.fan.zhang,
pablo.de.lara.guarch
Cc: dev
> Subject: [PATCH v3] test/crypto: fix: test vectors for zuc 256 bit key
>
> Fix the test vectors added for zuc 256-bit key
> Add known vectors form ZUC 256 RFC.
>
> Fixes: fa5bf9345d4e (test/crypto: add ZUC cases with 256-bit keys)
>
> Signed-off-by: Vidya Sagar Velumuri <vvelumuri@marvell.com>
@Pablo/Fan: Any objections for merging this patch.
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [dpdk-dev] [PATCH v3] test/crypto: fix: test vectors for zuc 256 bit key
2021-11-04 10:52 ` Akhil Goyal
@ 2021-11-04 12:18 ` De Lara Guarch, Pablo
2021-11-04 18:38 ` Akhil Goyal
0 siblings, 1 reply; 14+ messages in thread
From: De Lara Guarch, Pablo @ 2021-11-04 12:18 UTC (permalink / raw)
To: Akhil Goyal, Vidya Sagar Velumuri, Ankur Dwivedi, Anoob Joseph,
Tejasree Kondoj, Nithin Kumar Dabilpuram, Zhang, Roy Fan
Cc: dev
> -----Original Message-----
> From: Akhil Goyal <gakhil@marvell.com>
> Sent: Thursday, November 4, 2021 10:53 AM
> To: Vidya Sagar Velumuri <vvelumuri@marvell.com>; Ankur Dwivedi
> <adwivedi@marvell.com>; Anoob Joseph <anoobj@marvell.com>; Tejasree
> Kondoj <ktejasree@marvell.com>; Nithin Kumar Dabilpuram
> <ndabilpuram@marvell.com>; Zhang, Roy Fan <roy.fan.zhang@intel.com>; De
> Lara Guarch, Pablo <pablo.de.lara.guarch@intel.com>
> Cc: dev@dpdk.org
> Subject: RE: [PATCH v3] test/crypto: fix: test vectors for zuc 256 bit key
>
> > Subject: [PATCH v3] test/crypto: fix: test vectors for zuc 256 bit key
> >
> > Fix the test vectors added for zuc 256-bit key Add known vectors form
> > ZUC 256 RFC.
> >
> > Fixes: fa5bf9345d4e (test/crypto: add ZUC cases with 256-bit keys)
> >
> > Signed-off-by: Vidya Sagar Velumuri <vvelumuri@marvell.com>
>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [dpdk-dev] [PATCH v3] test/crypto: fix: test vectors for zuc 256 bit key
2021-11-04 12:18 ` De Lara Guarch, Pablo
@ 2021-11-04 18:38 ` Akhil Goyal
0 siblings, 0 replies; 14+ messages in thread
From: Akhil Goyal @ 2021-11-04 18:38 UTC (permalink / raw)
To: De Lara Guarch, Pablo, Vidya Sagar Velumuri, Ankur Dwivedi,
Anoob Joseph, Tejasree Kondoj, Nithin Kumar Dabilpuram, Zhang,
Roy Fan
Cc: dev
> > > Subject: [PATCH v3] test/crypto: fix: test vectors for zuc 256 bit key
> > >
> > > Fix the test vectors added for zuc 256-bit key Add known vectors form
> > > ZUC 256 RFC.
> > >
> > > Fixes: fa5bf9345d4e (test/crypto: add ZUC cases with 256-bit keys)
> > >
> > > Signed-off-by: Vidya Sagar Velumuri <vvelumuri@marvell.com>
> >
> Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Applied to dpdk-next-crypto
Thanks.
^ permalink raw reply [flat|nested] 14+ messages in thread
end of thread, other threads:[~2021-11-04 18:38 UTC | newest]
Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-27 8:40 [dpdk-dev] [PATCH v1] test/crypto: fix: test vectors for zuc 256 bit key Vidya Sagar Velumuri
2021-10-28 7:10 ` Akhil Goyal
2021-10-29 12:37 ` De Lara Guarch, Pablo
2021-10-30 12:25 ` Vidya Sagar Velumuri
2021-10-31 22:06 ` De Lara Guarch, Pablo
2021-11-01 10:23 ` Vidya Sagar Velumuri
2021-11-02 4:40 ` Vidya Sagar Velumuri
2021-11-02 11:17 ` De Lara Guarch, Pablo
2021-11-03 6:55 ` [dpdk-dev] [PATCH v2] " Vidya Sagar Velumuri
2021-11-03 9:28 ` De Lara Guarch, Pablo
2021-11-03 9:31 ` [dpdk-dev] [PATCH v3] " Vidya Sagar Velumuri
2021-11-04 10:52 ` Akhil Goyal
2021-11-04 12:18 ` De Lara Guarch, Pablo
2021-11-04 18:38 ` Akhil Goyal
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).