test/crypto: fix: test vectors for zuc 256 bit key
PATCH 1/1 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
app/test/test_cryptodev.c +1 -1
@@ -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
app/test/test_cryptodev_zuc_test_vectors.h +55 -73
185 lines not on this page · raw message
Signature · 1 line
2.31.1
Quoted 6 lines
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 <[email protected]>
@Fan Zhang, @[email protected]: can you verify at your end? And see if Bug 828 in Bugzilla gets resolved with this.
Hi Vidya,
Quoted 9 lines
-----Original Message-----
From: dev <[email protected]> On Behalf Of Vidya Sagar Velumuri
Sent: Wednesday, October 27, 2021 9:41 AM
To: [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; Doherty, Declan <[email protected]>
Cc: [email protected]
Subject: [dpdk-dev] [PATCH v1] test/crypto: fix: test vectors for zuc 256 bit key
Quoted 5 lines
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 <[email protected]>
The new vectors are failing for us. Could you check if the ones we added work for you?
Thanks,
Pablo
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 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 <[email protected]>
Sent: 29 October 2021 18:07
To: Vidya Sagar Velumuri <[email protected]>; Ankur Dwivedi <[email protected]>; Anoob Joseph <[email protected]>; Tejasree Kondoj <[email protected]>; Nithin Kumar Dabilpuram <[email protected]>; Akhil Goyal <[email protected]>; Doherty, Declan <[email protected]>
Cc: [email protected] <[email protected]>
Subject: [EXT] RE: [dpdk-dev] [PATCH v1] test/crypto: fix: test vectors for zuc 256 bit key
External Email
----------------------------------------------------------------------
Hi Vidya,
Quoted 9 lines
-----Original Message-----
From: dev <[email protected]> On Behalf Of Vidya Sagar Velumuri
Sent: Wednesday, October 27, 2021 9:41 AM
To: [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; Doherty, Declan <[email protected]>
Cc: [email protected]
Subject: [dpdk-dev] [PATCH v1] test/crypto: fix: test vectors for zuc 256 bit key
Quoted 5 lines
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 <[email protected]>
The new vectors are failing for us. Could you check if the ones we added work for you?
Thanks,
Pablo
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/[email protected]/
Could you check if they work for you?
Thanks,
Pablo
From: Vidya Sagar Velumuri <[email protected]>
Sent: Saturday, October 30, 2021 1:26 PM
To: De Lara Guarch, Pablo <[email protected]>; Ankur Dwivedi <[email protected]>; Anoob Joseph <[email protected]>; Tejasree Kondoj <[email protected]>; Nithin Kumar Dabilpuram <[email protected]>; Akhil Goyal <[email protected]>; Doherty, Declan <[email protected]>
Cc: [email protected]
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 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 <[email protected]<mailto:[email protected]>>
Sent: 29 October 2021 18:07
To: Vidya Sagar Velumuri <[email protected]<mailto:[email protected]>>; Ankur Dwivedi <[email protected]<mailto:[email protected]>>; Anoob Joseph <[email protected]<mailto:[email protected]>>; Tejasree Kondoj <[email protected]<mailto:[email protected]>>; Nithin Kumar Dabilpuram <[email protected]<mailto:[email protected]>>; Akhil Goyal <[email protected]<mailto:[email protected]>>; Doherty, Declan <[email protected]<mailto:[email protected]>>
Cc: [email protected]<mailto:[email protected]> <[email protected]<mailto:[email protected]>>
Subject: [EXT] RE: [dpdk-dev] [PATCH v1] test/crypto: fix: test vectors for zuc 256 bit key
External Email
----------------------------------------------------------------------
Hi Vidya,
Quoted 9 lines
-----Original Message-----
From: dev <[email protected]<mailto:[email protected]>> On Behalf Of Vidya Sagar Velumuri
Sent: Wednesday, October 27, 2021 9:41 AM
To: [email protected]<mailto:[email protected]>; [email protected]<mailto:[email protected]>; [email protected]<mailto:[email protected]>; [email protected]<mailto:[email protected]>; [email protected]<mailto:[email protected]>; Doherty, Declan <[email protected]<mailto:[email protected]>>
Cc: [email protected]<mailto:[email protected]>
Subject: [dpdk-dev] [PATCH v1] test/crypto: fix: test vectors for zuc 256 bit key
Quoted 5 lines
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)
The new vectors are failing for us. Could you check if the ones we added work for you?
Thanks,
Pablo
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 <[email protected]>
Sent: 01 November 2021 03:36
To: Vidya Sagar Velumuri <[email protected]>; Ankur Dwivedi <[email protected]>; Anoob Joseph <[email protected]>; Tejasree Kondoj <[email protected]>; Nithin Kumar Dabilpuram <[email protected]>; Akhil Goyal <[email protected]>; Doherty, Declan <[email protected]>
Cc: [email protected] <[email protected]>
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/[email protected]/<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 <[email protected]>
Sent: Saturday, October 30, 2021 1:26 PM
To: De Lara Guarch, Pablo <[email protected]>; Ankur Dwivedi <[email protected]>; Anoob Joseph <[email protected]>; Tejasree Kondoj <[email protected]>; Nithin Kumar Dabilpuram <[email protected]>; Akhil Goyal <[email protected]>; Doherty, Declan <[email protected]>
Cc: [email protected]
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 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 <[email protected]<mailto:[email protected]>>
Sent: 29 October 2021 18:07
To: Vidya Sagar Velumuri <[email protected]<mailto:[email protected]>>; Ankur Dwivedi <[email protected]<mailto:[email protected]>>; Anoob Joseph <[email protected]<mailto:[email protected]>>; Tejasree Kondoj <[email protected]<mailto:[email protected]>>; Nithin Kumar Dabilpuram <[email protected]<mailto:[email protected]>>; Akhil Goyal <[email protected]<mailto:[email protected]>>; Doherty, Declan <[email protected]<mailto:[email protected]>>
Cc: [email protected]<mailto:[email protected]> <[email protected]<mailto:[email protected]>>
Subject: [EXT] RE: [dpdk-dev] [PATCH v1] test/crypto: fix: test vectors for zuc 256 bit key
External Email
----------------------------------------------------------------------
Hi Vidya,
Quoted 9 lines
-----Original Message-----
From: dev <[email protected]<mailto:[email protected]>> On Behalf Of Vidya Sagar Velumuri
Sent: Wednesday, October 27, 2021 9:41 AM
To: [email protected]<mailto:[email protected]>; [email protected]<mailto:[email protected]>; [email protected]<mailto:[email protected]>; [email protected]<mailto:[email protected]>; [email protected]<mailto:[email protected]>; Doherty, Declan <[email protected]<mailto:[email protected]>>
Cc: [email protected]<mailto:[email protected]>
Subject: [dpdk-dev] [PATCH v1] test/crypto: fix: test vectors for zuc 256 bit key
Quoted 5 lines
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)
The new vectors are failing for us. Could you check if the ones we added work for you?
Thanks,
Pablo
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 <[email protected]>
Sent: 01 November 2021 15:53
To: De Lara Guarch, Pablo <[email protected]>; Ankur Dwivedi <[email protected]>; Anoob Joseph <[email protected]>; Tejasree Kondoj <[email protected]>; Nithin Kumar Dabilpuram <[email protected]>; Akhil Goyal <[email protected]>; Doherty, Declan <[email protected]>
Cc: [email protected] <[email protected]>
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 <[email protected]>
Sent: 01 November 2021 03:36
To: Vidya Sagar Velumuri <[email protected]>; Ankur Dwivedi <[email protected]>; Anoob Joseph <[email protected]>; Tejasree Kondoj <[email protected]>; Nithin Kumar Dabilpuram <[email protected]>; Akhil Goyal <[email protected]>; Doherty, Declan <[email protected]>
Cc: [email protected] <[email protected]>
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/[email protected]/<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 <[email protected]>
Sent: Saturday, October 30, 2021 1:26 PM
To: De Lara Guarch, Pablo <[email protected]>; Ankur Dwivedi <[email protected]>; Anoob Joseph <[email protected]>; Tejasree Kondoj <[email protected]>; Nithin Kumar Dabilpuram <[email protected]>; Akhil Goyal <[email protected]>; Doherty, Declan <[email protected]>
Cc: [email protected]
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 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 <[email protected]<mailto:[email protected]>>
Sent: 29 October 2021 18:07
To: Vidya Sagar Velumuri <[email protected]<mailto:[email protected]>>; Ankur Dwivedi <[email protected]<mailto:[email protected]>>; Anoob Joseph <[email protected]<mailto:[email protected]>>; Tejasree Kondoj <[email protected]<mailto:[email protected]>>; Nithin Kumar Dabilpuram <[email protected]<mailto:[email protected]>>; Akhil Goyal <[email protected]<mailto:[email protected]>>; Doherty, Declan <[email protected]<mailto:[email protected]>>
Cc: [email protected]<mailto:[email protected]> <[email protected]<mailto:[email protected]>>
Subject: [EXT] RE: [dpdk-dev] [PATCH v1] test/crypto: fix: test vectors for zuc 256 bit key
External Email
----------------------------------------------------------------------
Hi Vidya,
Quoted 9 lines
-----Original Message-----
From: dev <[email protected]<mailto:[email protected]>> On Behalf Of Vidya Sagar Velumuri
Sent: Wednesday, October 27, 2021 9:41 AM
To: [email protected]<mailto:[email protected]>; [email protected]<mailto:[email protected]>; [email protected]<mailto:[email protected]>; [email protected]<mailto:[email protected]>; [email protected]<mailto:[email protected]>; Doherty, Declan <[email protected]<mailto:[email protected]>>
Cc: [email protected]<mailto:[email protected]>
Subject: [dpdk-dev] [PATCH v1] test/crypto: fix: test vectors for zuc 256 bit key
Quoted 5 lines
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)
The new vectors are failing for us. Could you check if the ones we added work for you?
Thanks,
Pablo
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 <[email protected]>
Sent: Tuesday, November 2, 2021 4:41 AM
To: De Lara Guarch, Pablo <[email protected]>; Ankur Dwivedi <[email protected]>; Anoob Joseph <[email protected]>; Tejasree Kondoj <[email protected]>; Nithin Kumar Dabilpuram <[email protected]>; Akhil Goyal <[email protected]>; Doherty, Declan <[email protected]>
Cc: [email protected]
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 <[email protected]<mailto:[email protected]>>
Sent: 01 November 2021 15:53
To: De Lara Guarch, Pablo <[email protected]<mailto:[email protected]>>; Ankur Dwivedi <[email protected]<mailto:[email protected]>>; Anoob Joseph <[email protected]<mailto:[email protected]>>; Tejasree Kondoj <[email protected]<mailto:[email protected]>>; Nithin Kumar Dabilpuram <[email protected]<mailto:[email protected]>>; Akhil Goyal <[email protected]<mailto:[email protected]>>; Doherty, Declan <[email protected]<mailto:[email protected]>>
Cc: [email protected]<mailto:[email protected]> <[email protected]<mailto:[email protected]>>
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 <[email protected]<mailto:[email protected]>>
Sent: 01 November 2021 03:36
To: Vidya Sagar Velumuri <[email protected]<mailto:[email protected]>>; Ankur Dwivedi <[email protected]<mailto:[email protected]>>; Anoob Joseph <[email protected]<mailto:[email protected]>>; Tejasree Kondoj <[email protected]<mailto:[email protected]>>; Nithin Kumar Dabilpuram <[email protected]<mailto:[email protected]>>; Akhil Goyal <[email protected]<mailto:[email protected]>>; Doherty, Declan <[email protected]<mailto:[email protected]>>
Cc: [email protected]<mailto:[email protected]> <[email protected]<mailto:[email protected]>>
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/[email protected]/<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 <[email protected]<mailto:[email protected]>>
Sent: Saturday, October 30, 2021 1:26 PM
To: De Lara Guarch, Pablo <[email protected]<mailto:[email protected]>>; Ankur Dwivedi <[email protected]<mailto:[email protected]>>; Anoob Joseph <[email protected]<mailto:[email protected]>>; Tejasree Kondoj <[email protected]<mailto:[email protected]>>; Nithin Kumar Dabilpuram <[email protected]<mailto:[email protected]>>; Akhil Goyal <[email protected]<mailto:[email protected]>>; Doherty, Declan <[email protected]<mailto:[email protected]>>
Cc: [email protected]<mailto:[email protected]>
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 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 <[email protected]<mailto:[email protected]>>
Sent: 29 October 2021 18:07
To: Vidya Sagar Velumuri <[email protected]<mailto:[email protected]>>; Ankur Dwivedi <[email protected]<mailto:[email protected]>>; Anoob Joseph <[email protected]<mailto:[email protected]>>; Tejasree Kondoj <[email protected]<mailto:[email protected]>>; Nithin Kumar Dabilpuram <[email protected]<mailto:[email protected]>>; Akhil Goyal <[email protected]<mailto:[email protected]>>; Doherty, Declan <[email protected]<mailto:[email protected]>>
Cc: [email protected]<mailto:[email protected]> <[email protected]<mailto:[email protected]>>
Subject: [EXT] RE: [dpdk-dev] [PATCH v1] test/crypto: fix: test vectors for zuc 256 bit key
External Email
----------------------------------------------------------------------
Hi Vidya,
Quoted 9 lines
-----Original Message-----
From: dev <[email protected]<mailto:[email protected]>> On Behalf Of Vidya Sagar Velumuri
Sent: Wednesday, October 27, 2021 9:41 AM
To: [email protected]<mailto:[email protected]>; [email protected]<mailto:[email protected]>; [email protected]<mailto:[email protected]>; [email protected]<mailto:[email protected]>; [email protected]<mailto:[email protected]>; Doherty, Declan <[email protected]<mailto:[email protected]>>
Cc: [email protected]<mailto:[email protected]>
Subject: [dpdk-dev] [PATCH v1] test/crypto: fix: test vectors for zuc 256 bit key
Quoted 5 lines
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)
The new vectors are failing for us. Could you check if the ones we added work for you?
Thanks,
Pablo
PATCH v2 1/1 test/crypto: fix: test vectors for zuc 256 bit key
In reply to Vidya Sagar VelumuriFix the test vectors added for zuc 256-bit key
Add known vectores form ZUC 256 RFC.
app/test/test_cryptodev.c +10 -10
@@ -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) */
app/test/test_cryptodev_zuc_test_vectors.h +72 -132
254 lines not on this page · raw message
Signature · 1 line
2.31.1
Hi Sagar,
Quoted 9 lines
-----Original Message-----
From: dev <[email protected]> On Behalf Of Vidya Sagar Velumuri
Sent: Wednesday, November 3, 2021 6:55 AM
To: [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; Zhang, Roy Fan <[email protected]>
Cc: [email protected]
Subject: [dpdk-dev] [PATCH v2] test/crypto: fix: test vectors for zuc 256 bit key
Quoted 6 lines
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 <[email protected]>
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
PATCH v3 1/1 test/crypto: fix: test vectors for zuc 256 bit key
In reply to Vidya Sagar VelumuriFix the test vectors added for zuc 256-bit key
Add known vectors form ZUC 256 RFC.
v3:
* Fixed spell check
app/test/test_cryptodev.c +10 -10
@@ -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) */
app/test/test_cryptodev_zuc_test_vectors.h +72 -132
254 lines not on this page · raw message
Signature · 1 line
2.31.1
Quoted 8 lines
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 <[email protected]>
@Pablo/Fan: Any objections for merging this patch.
De Lara Guarch, Pablo
Acked-byQuoted 22 lines
-----Original Message-----
From: Akhil Goyal <[email protected]>
Sent: Thursday, November 4, 2021 10:53 AM
To: Vidya Sagar Velumuri <[email protected]>; Ankur Dwivedi <[email protected]>; Anoob Joseph <[email protected]>; Tejasree Kondoj <[email protected]>; Nithin Kumar Dabilpuram <[email protected]>; Zhang, Roy Fan <[email protected]>; De Lara Guarch, Pablo <[email protected]>
Cc: [email protected]
Subject: RE: [PATCH v3] test/crypto: fix: test vectors for zuc 256 bit keyQuoted 8 lines
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 <[email protected]>
Akhil Goyal
AppliedQuoted 10 lines
Quoted 9 lines
Quoted 8 lines
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 <[email protected]>Acked-by Pablo de Lara <[email protected]>
Applied to dpdk-next-crypto
Thanks.