* [PATCH 0/2] fix wireless algorithm IVs @ 2022-06-23 14:42 Ciara Power 2022-06-23 14:42 ` [PATCH 1/2] test/crypto: fix zuc test vector IV format Ciara Power ` (3 more replies) 0 siblings, 4 replies; 7+ messages in thread From: Ciara Power @ 2022-06-23 14:42 UTC (permalink / raw) Cc: dev, kai.ji, roy.fan.zhang, pablo.de.lara.guarch, ktejasree, gakhil, Ciara Power Some of the ZUC and Snow3G test vectors did not follow the specification for the cipher and authentication IVs. These are now updated to follow the spec documents: ZUC 128 spec: https://www.gsma.com/security/wp-content/uploads/2019/05/EEA3_EIA3_specification_v1_8.pdf Snow3G spec: https://www.gsma.com/aboutus/wp-content/uploads/2014/12/uea2uia2d1v21.pdf Ciara Power (2): test/crypto: fix zuc test vector IV format test/crypto: fix snow3g test vector IV format app/test/test_cryptodev_snow3g_test_vectors.h | 142 +++++++++--------- app/test/test_cryptodev_zuc_test_vectors.h | 54 +++---- 2 files changed, 98 insertions(+), 98 deletions(-) -- 2.25.1 ^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 1/2] test/crypto: fix zuc test vector IV format 2022-06-23 14:42 [PATCH 0/2] fix wireless algorithm IVs Ciara Power @ 2022-06-23 14:42 ` Ciara Power 2022-06-27 6:00 ` [EXT] " Tejasree Kondoj 2022-06-23 14:42 ` [PATCH 2/2] test/crypto: fix snow3g " Ciara Power ` (2 subsequent siblings) 3 siblings, 1 reply; 7+ messages in thread From: Ciara Power @ 2022-06-23 14:42 UTC (permalink / raw) To: Akhil Goyal, Fan Zhang Cc: dev, kai.ji, pablo.de.lara.guarch, ktejasree, Ciara Power, arkadiuszx.kusztal, stable Some authentication and cipher IV formats were not following the spec [1]. For ZUC128 cipher IV, an 8 byte block is repeated, with the last 3 bytes of each being 0x0. IV[4] and IV[12] must have the last 2 bits set to 0. Auth IVs must also have repeated bytes with the last 3 bytes containing 0x0 in each 8 byte block. IV[4] and IV[12] must have the last 3 bits set to 0. IV[8] and IV[14] may have a flipped bit based on direction. [1] https://www.gsma.com/security/wp-content/uploads/2019/05/EEA3_EIA3_specification_v1_8.pdf Fixes: a81a81850fb1 ("test/crypto: add ZUC test cases for QAT") Fixes: b1c1df46878d ("test/crypto: add ZUC test cases for auth-cipher") Cc: arkadiuszx.kusztal@intel.com Cc: stable@dpdk.org Signed-off-by: Ciara Power <ciara.power@intel.com> --- app/test/test_cryptodev_zuc_test_vectors.h | 54 +++++++++++----------- 1 file changed, 27 insertions(+), 27 deletions(-) diff --git a/app/test/test_cryptodev_zuc_test_vectors.h b/app/test/test_cryptodev_zuc_test_vectors.h index 5d1d264579..299d7649fe 100644 --- a/app/test/test_cryptodev_zuc_test_vectors.h +++ b/app/test/test_cryptodev_zuc_test_vectors.h @@ -558,13 +558,13 @@ static struct wireless_test_data zuc_test_case_cipher_200b_auth_200b = { }, .auth_iv = { .data = { - 0xFA, 0x55, 0x6B, 0x26, 0x1C, 0x00, 0x00, 0x00, - 0xFA, 0x55, 0x6B, 0x26, 0x1C, 0x00, 0x00, 0x00 + 0xFA, 0x55, 0x6B, 0x26, 0x18, 0x00, 0x00, 0x00, + 0xFA, 0x55, 0x6B, 0x26, 0x18, 0x00, 0x00, 0x00 }, .len = 16 }, .digest = { - .data = {0x01, 0xFE, 0x5E, 0x38}, + .data = {0x2F, 0x45, 0x7D, 0x7B}, .len = 4 }, .validAuthLenInBits = { @@ -631,13 +631,13 @@ static struct wireless_test_data zuc_test_case_cipher_800b_auth_120b = { }, .auth_iv = { .data = { - 0xFA, 0x55, 0x6B, 0x26, 0x1C, 0x00, 0x00, 0x00, - 0xFA, 0x55, 0x6B, 0x26, 0x1C, 0x00, 0x00, 0x00 + 0xFA, 0x55, 0x6B, 0x26, 0x18, 0x00, 0x00, 0x00, + 0xFA, 0x55, 0x6B, 0x26, 0x18, 0x00, 0x00, 0x00 }, .len = 16 }, .digest = { - .data = {0x9D, 0x42, 0x1C, 0xEA}, + .data = {0xCA, 0xBB, 0x8D, 0x94}, .len = 4 }, .validAuthLenInBits = { @@ -1166,15 +1166,15 @@ struct wireless_test_data zuc_auth_cipher_test_case_1 = { }, .cipher_iv = { .data = { - 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + 0x66, 0x03, 0x54, 0x92, 0x78, 0x00, 0x00, 0x00, + 0x66, 0x03, 0x54, 0x92, 0x78, 0x00, 0x00, 0x00 }, .len = 16 }, .auth_iv = { .data = { - 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + 0xFA, 0x55, 0x6B, 0x26, 0x18, 0x00, 0x00, 0x00, + 0xFA, 0x55, 0x6B, 0x26, 0x18, 0x00, 0x00, 0x00 }, .len = 16 }, @@ -1201,22 +1201,22 @@ struct wireless_test_data zuc_auth_cipher_test_case_1 = { }, .ciphertext = { .data = { - 0x5A, 0x5A, 0xDB, 0x3D, 0xD5, 0xB7, 0xB9, 0x58, - 0xA5, 0xD3, 0xE3, 0xF9, 0x18, 0x73, 0xB4, 0x74, - 0x05, 0xF0, 0xE9, 0xB6, 0x5D, 0x9A, 0xE3, 0xFA, - 0x5D, 0xFD, 0x24, 0x51, 0xAD, 0x73, 0xCA, 0x64, - 0x91, 0xD5, 0xB3, 0x94, 0x10, 0x91, 0x89, 0xEA, - 0x73, 0x6F, 0xB0, 0x2A, 0x0A, 0x63, 0x0F, 0x8D, - 0x64, 0x87, 0xA3, 0x14, 0x6B, 0x93, 0x31, 0x0F, - 0x14, 0xAD, 0xEA, 0x62, 0x80, 0x3F, 0x44, 0xDD, - 0x4E, 0x30, 0xFA, 0xC8, 0x0E, 0x5F, 0x46, 0xE7, - 0x60, 0xEC, 0xDF, 0x8B, 0x94, 0x7D, 0x2E, 0x63, - 0x48, 0xD9, 0x69, 0x06, 0x13, 0xF2, 0x20, 0x49, - 0x54, 0xA6, 0xD4, 0x98, 0xF4, 0xF6, 0x1D, 0x4A, - 0xC9, 0xA5, 0xDA, 0x46, 0x3D, 0xD9, 0x02, 0x47, - 0x1C, 0x20, 0x73, 0x35, 0x17, 0x1D, 0x81, 0x8D, - 0x2E, 0xCD, 0x70, 0x37, 0x22, 0x55, 0x3C, 0xF3, - 0xDA, 0x70, 0x42, 0x12, 0x0E, 0xAA, 0xC4, 0xAB + 0x5A, 0x5A, 0x94, 0xE7, 0xB8, 0xD7, 0x4E, 0xBB, + 0x4C, 0xC3, 0xD1, 0x16, 0xFC, 0x8C, 0xE4, 0x27, + 0x44, 0xEC, 0x04, 0x26, 0x60, 0x9C, 0xFF, 0x81, + 0xB6, 0x2B, 0x48, 0x1D, 0xEE, 0x26, 0xF7, 0x58, + 0x40, 0x38, 0x58, 0xEA, 0x22, 0x23, 0xE6, 0x34, + 0x9A, 0x69, 0x32, 0x68, 0xBD, 0xDD, 0x7D, 0xA3, + 0xC0, 0x04, 0x79, 0xF0, 0xF1, 0x58, 0x78, 0x5E, + 0xD0, 0xDF, 0x27, 0x9A, 0x53, 0x70, 0x5D, 0xFB, + 0x1B, 0xCA, 0xBA, 0x97, 0x12, 0x1F, 0x59, 0x6B, + 0x75, 0x7B, 0x94, 0xF6, 0xE7, 0xFA, 0x49, 0x6B, + 0x7D, 0x7F, 0x8F, 0x0F, 0x78, 0x56, 0x40, 0x52, + 0x84, 0x3E, 0xA9, 0xE8, 0x84, 0x6F, 0xEF, 0xFB, + 0x4A, 0x48, 0x3A, 0x4C, 0x81, 0x98, 0xDD, 0x17, + 0x89, 0x66, 0x3B, 0xC0, 0xEC, 0x71, 0xDB, 0xF6, + 0x44, 0xDF, 0xA7, 0x97, 0xB2, 0x9B, 0x84, 0xA7, + 0x2D, 0x2D, 0xC1, 0x93, 0x12, 0x37, 0xEA, 0xD2 }, .len = 128 << 3 }, @@ -1233,7 +1233,7 @@ struct wireless_test_data zuc_auth_cipher_test_case_1 = { .len = 2 << 3 }, .digest = { - .data = {0x0E, 0xAA, 0xC4, 0xAB}, + .data = {0x12, 0x37, 0xEA, 0xD2}, .len = 4, .offset_bytes = 124 } -- 2.25.1 ^ permalink raw reply [flat|nested] 7+ messages in thread
* RE: [EXT] [PATCH 1/2] test/crypto: fix zuc test vector IV format 2022-06-23 14:42 ` [PATCH 1/2] test/crypto: fix zuc test vector IV format Ciara Power @ 2022-06-27 6:00 ` Tejasree Kondoj 0 siblings, 0 replies; 7+ messages in thread From: Tejasree Kondoj @ 2022-06-27 6:00 UTC (permalink / raw) To: Ciara Power, Akhil Goyal, Fan Zhang Cc: dev, kai.ji, pablo.de.lara.guarch, arkadiuszx.kusztal, stable Acked-by: Tejasree Kondoj <ktejasree@marvell.com> > -----Original Message----- > From: Ciara Power <ciara.power@intel.com> > Sent: Thursday, June 23, 2022 8:13 PM > To: Akhil Goyal <gakhil@marvell.com>; Fan Zhang > <roy.fan.zhang@intel.com> > Cc: dev@dpdk.org; kai.ji@intel.com; pablo.de.lara.guarch@intel.com; > Tejasree Kondoj <ktejasree@marvell.com>; Ciara Power > <ciara.power@intel.com>; arkadiuszx.kusztal@intel.com; stable@dpdk.org > Subject: [EXT] [PATCH 1/2] test/crypto: fix zuc test vector IV format > > External Email > > ---------------------------------------------------------------------- > Some authentication and cipher IV formats were not following the spec [1]. > > For ZUC128 cipher IV, an 8 byte block is repeated, with the last 3 bytes of > each being 0x0. > IV[4] and IV[12] must have the last 2 bits set to 0. > > Auth IVs must also have repeated bytes with the last 3 bytes containing 0x0 > in each 8 byte block. > IV[4] and IV[12] must have the last 3 bits set to 0. > IV[8] and IV[14] may have a flipped bit based on direction. > > [1] https://urldefense.proofpoint.com/v2/url?u=https- > 3A__www.gsma.com_security_wp-2Dcontent_uploads_2019_05_EEA3- > 5FEIA3-5Fspecification-5Fv1- > 5F8.pdf&d=DwIDAg&c=nKjWec2b6R0mOyPaz7xtfQ&r=NjpqGUAf6Xc0ZLzxCvv > 4idf8zRFeSJHioNlG1Wif1Gs&m=fBghjXYEElUgAXJtsiS2rol3rtkR155ftFsgE- > jC6QA9kkKONba0SENdDyRjwcvv&s=LEfRBY1bfwSrbkxNfU44OMqyX2RrbqH6l > GcxOA5U-pc&e= > > Fixes: a81a81850fb1 ("test/crypto: add ZUC test cases for QAT") > Fixes: b1c1df46878d ("test/crypto: add ZUC test cases for auth-cipher") > Cc: arkadiuszx.kusztal@intel.com > Cc: stable@dpdk.org > > Signed-off-by: Ciara Power <ciara.power@intel.com> > --- > app/test/test_cryptodev_zuc_test_vectors.h | 54 +++++++++++----------- > 1 file changed, 27 insertions(+), 27 deletions(-) > > diff --git a/app/test/test_cryptodev_zuc_test_vectors.h > b/app/test/test_cryptodev_zuc_test_vectors.h > index 5d1d264579..299d7649fe 100644 > --- a/app/test/test_cryptodev_zuc_test_vectors.h > +++ b/app/test/test_cryptodev_zuc_test_vectors.h > @@ -558,13 +558,13 @@ static struct wireless_test_data > zuc_test_case_cipher_200b_auth_200b = { > }, > .auth_iv = { > .data = { > - 0xFA, 0x55, 0x6B, 0x26, 0x1C, 0x00, 0x00, 0x00, > - 0xFA, 0x55, 0x6B, 0x26, 0x1C, 0x00, 0x00, 0x00 > + 0xFA, 0x55, 0x6B, 0x26, 0x18, 0x00, 0x00, 0x00, > + 0xFA, 0x55, 0x6B, 0x26, 0x18, 0x00, 0x00, 0x00 > }, > .len = 16 > }, > .digest = { > - .data = {0x01, 0xFE, 0x5E, 0x38}, > + .data = {0x2F, 0x45, 0x7D, 0x7B}, > .len = 4 > }, > .validAuthLenInBits = { > @@ -631,13 +631,13 @@ static struct wireless_test_data > zuc_test_case_cipher_800b_auth_120b = { > }, > .auth_iv = { > .data = { > - 0xFA, 0x55, 0x6B, 0x26, 0x1C, 0x00, 0x00, 0x00, > - 0xFA, 0x55, 0x6B, 0x26, 0x1C, 0x00, 0x00, 0x00 > + 0xFA, 0x55, 0x6B, 0x26, 0x18, 0x00, 0x00, 0x00, > + 0xFA, 0x55, 0x6B, 0x26, 0x18, 0x00, 0x00, 0x00 > }, > .len = 16 > }, > .digest = { > - .data = {0x9D, 0x42, 0x1C, 0xEA}, > + .data = {0xCA, 0xBB, 0x8D, 0x94}, > .len = 4 > }, > .validAuthLenInBits = { > @@ -1166,15 +1166,15 @@ struct wireless_test_data > zuc_auth_cipher_test_case_1 = { > }, > .cipher_iv = { > .data = { > - 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, > - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 > + 0x66, 0x03, 0x54, 0x92, 0x78, 0x00, 0x00, 0x00, > + 0x66, 0x03, 0x54, 0x92, 0x78, 0x00, 0x00, 0x00 > }, > .len = 16 > }, > .auth_iv = { > .data = { > - 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, > - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 > + 0xFA, 0x55, 0x6B, 0x26, 0x18, 0x00, 0x00, 0x00, > + 0xFA, 0x55, 0x6B, 0x26, 0x18, 0x00, 0x00, 0x00 > }, > .len = 16 > }, > @@ -1201,22 +1201,22 @@ struct wireless_test_data > zuc_auth_cipher_test_case_1 = { > }, > .ciphertext = { > .data = { > - 0x5A, 0x5A, 0xDB, 0x3D, 0xD5, 0xB7, 0xB9, 0x58, > - 0xA5, 0xD3, 0xE3, 0xF9, 0x18, 0x73, 0xB4, 0x74, > - 0x05, 0xF0, 0xE9, 0xB6, 0x5D, 0x9A, 0xE3, 0xFA, > - 0x5D, 0xFD, 0x24, 0x51, 0xAD, 0x73, 0xCA, 0x64, > - 0x91, 0xD5, 0xB3, 0x94, 0x10, 0x91, 0x89, 0xEA, > - 0x73, 0x6F, 0xB0, 0x2A, 0x0A, 0x63, 0x0F, 0x8D, > - 0x64, 0x87, 0xA3, 0x14, 0x6B, 0x93, 0x31, 0x0F, > - 0x14, 0xAD, 0xEA, 0x62, 0x80, 0x3F, 0x44, 0xDD, > - 0x4E, 0x30, 0xFA, 0xC8, 0x0E, 0x5F, 0x46, 0xE7, > - 0x60, 0xEC, 0xDF, 0x8B, 0x94, 0x7D, 0x2E, 0x63, > - 0x48, 0xD9, 0x69, 0x06, 0x13, 0xF2, 0x20, 0x49, > - 0x54, 0xA6, 0xD4, 0x98, 0xF4, 0xF6, 0x1D, 0x4A, > - 0xC9, 0xA5, 0xDA, 0x46, 0x3D, 0xD9, 0x02, 0x47, > - 0x1C, 0x20, 0x73, 0x35, 0x17, 0x1D, 0x81, 0x8D, > - 0x2E, 0xCD, 0x70, 0x37, 0x22, 0x55, 0x3C, 0xF3, > - 0xDA, 0x70, 0x42, 0x12, 0x0E, 0xAA, 0xC4, 0xAB > + 0x5A, 0x5A, 0x94, 0xE7, 0xB8, 0xD7, 0x4E, 0xBB, > + 0x4C, 0xC3, 0xD1, 0x16, 0xFC, 0x8C, 0xE4, 0x27, > + 0x44, 0xEC, 0x04, 0x26, 0x60, 0x9C, 0xFF, 0x81, > + 0xB6, 0x2B, 0x48, 0x1D, 0xEE, 0x26, 0xF7, 0x58, > + 0x40, 0x38, 0x58, 0xEA, 0x22, 0x23, 0xE6, 0x34, > + 0x9A, 0x69, 0x32, 0x68, 0xBD, 0xDD, 0x7D, 0xA3, > + 0xC0, 0x04, 0x79, 0xF0, 0xF1, 0x58, 0x78, 0x5E, > + 0xD0, 0xDF, 0x27, 0x9A, 0x53, 0x70, 0x5D, 0xFB, > + 0x1B, 0xCA, 0xBA, 0x97, 0x12, 0x1F, 0x59, 0x6B, > + 0x75, 0x7B, 0x94, 0xF6, 0xE7, 0xFA, 0x49, 0x6B, > + 0x7D, 0x7F, 0x8F, 0x0F, 0x78, 0x56, 0x40, 0x52, > + 0x84, 0x3E, 0xA9, 0xE8, 0x84, 0x6F, 0xEF, 0xFB, > + 0x4A, 0x48, 0x3A, 0x4C, 0x81, 0x98, 0xDD, 0x17, > + 0x89, 0x66, 0x3B, 0xC0, 0xEC, 0x71, 0xDB, 0xF6, > + 0x44, 0xDF, 0xA7, 0x97, 0xB2, 0x9B, 0x84, 0xA7, > + 0x2D, 0x2D, 0xC1, 0x93, 0x12, 0x37, 0xEA, 0xD2 > }, > .len = 128 << 3 > }, > @@ -1233,7 +1233,7 @@ struct wireless_test_data > zuc_auth_cipher_test_case_1 = { > .len = 2 << 3 > }, > .digest = { > - .data = {0x0E, 0xAA, 0xC4, 0xAB}, > + .data = {0x12, 0x37, 0xEA, 0xD2}, > .len = 4, > .offset_bytes = 124 > } > -- > 2.25.1 ^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 2/2] test/crypto: fix snow3g test vector IV format 2022-06-23 14:42 [PATCH 0/2] fix wireless algorithm IVs Ciara Power 2022-06-23 14:42 ` [PATCH 1/2] test/crypto: fix zuc test vector IV format Ciara Power @ 2022-06-23 14:42 ` Ciara Power 2022-06-27 6:00 ` [EXT] " Tejasree Kondoj 2022-06-24 7:36 ` [PATCH 0/2] fix wireless algorithm IVs De Lara Guarch, Pablo 2022-06-28 9:04 ` [EXT] " Akhil Goyal 3 siblings, 1 reply; 7+ messages in thread From: Ciara Power @ 2022-06-23 14:42 UTC (permalink / raw) To: Akhil Goyal, Fan Zhang Cc: dev, kai.ji, pablo.de.lara.guarch, ktejasree, Ciara Power, deepak.k.jain, lukaszx.krakowiak, stable Some of the cipher and authentication IVs did not follow the spec for SNOW3G algorithm [1]. Cipher IVs must have the last 3 bytes of each 8 byte block as 0x0. IV[4] and IV[12] must have the last 2 bits set to 0. Each 8 byte block is repeated. Auth IVs must also have a repeated 8 byte block. IV[8] and IV[14] may have a flipped bit based on direction. [1] https://www.gsma.com/aboutus/wp-content/uploads/2014/12/uea2uia2d1v21.pdf Fixes: 8bdf665fe6c0 ("app/test: add SNOW 3G") Fixes: 24342ade2c9d ("test/crypto: check SNOW3G when digest is encrypted") Fixes: 02ed7b3871d6 ("test/crypto: add SNOW3G test cases for auth-cipher") Fixes: 11c5485bb276 ("test/crypto: add scatter-gather tests for IP and OOP") Cc: deepak.k.jain@intel.com Cc: lukaszx.krakowiak@intel.com Cc: stable@dpdk.org Signed-off-by: Ciara Power <ciara.power@intel.com> --- app/test/test_cryptodev_snow3g_test_vectors.h | 142 +++++++++--------- 1 file changed, 71 insertions(+), 71 deletions(-) diff --git a/app/test/test_cryptodev_snow3g_test_vectors.h b/app/test/test_cryptodev_snow3g_test_vectors.h index bbe05662be..b49a07bcf2 100644 --- a/app/test/test_cryptodev_snow3g_test_vectors.h +++ b/app/test/test_cryptodev_snow3g_test_vectors.h @@ -138,11 +138,11 @@ struct snow3g_test_data snow3g_test_case_2 = { .len = 16 }, .cipher_iv = { - .data = { + .data = { 0xE2, 0x8B, 0xCF, 0x7B, 0xC0, 0x00, 0x00, 0x00, 0xE2, 0x8B, 0xCF, 0x7B, 0xC0, 0x00, 0x00, 0x00 }, - .len = 16 + .len = 16 }, .plaintext = { .data = { @@ -359,8 +359,8 @@ struct snow3g_test_data snow3g_auth_cipher_test_case_1 = { }, .cipher_iv = { .data = { - 0x14, 0x79, 0x3E, 0x41, 0x03, 0x97, 0xE8, 0xFD, - 0x94, 0x79, 0x3E, 0x41, 0x03, 0x97, 0x68, 0xFD + 0x72, 0xA4, 0xF2, 0x0F, 0x48, 0x00, 0x00, 0x00, + 0x72, 0xA4, 0xF2, 0x0F, 0x48, 0x00, 0x00, 0x00 }, .len = 16 }, @@ -383,13 +383,13 @@ struct snow3g_test_data snow3g_auth_cipher_test_case_1 = { .len = 384 }, .ciphertext = { - .data = { - 0x95, 0x2E, 0x5A, 0xE1, 0x50, 0xB8, 0x59, 0x2A, - 0x9B, 0xA0, 0x38, 0xA9, 0x8E, 0x2F, 0xED, 0xAB, - 0xFD, 0xC8, 0x3B, 0x47, 0x46, 0x0B, 0x50, 0x16, - 0xEC, 0x88, 0x45, 0xB6, 0x05, 0xC7, 0x54, 0xF8, - 0xBD, 0x91, 0xAA, 0xB6, 0xA4, 0xDC, 0x64, 0xB4, - 0xCB, 0xEB, 0x97, 0x06, 0x4C, 0xF7, 0x02, 0x3D + .data = { + 0x86, 0x4F, 0x4D, 0xE8, 0x86, 0xE6, 0x3E, 0x66, + 0x52, 0x97, 0xC7, 0x62, 0xAE, 0x8E, 0xA2, 0xDB, + 0x01, 0xD6, 0x33, 0xA9, 0xA4, 0xCE, 0x02, 0xD5, + 0xC2, 0xC5, 0x5F, 0x90, 0xE0, 0x89, 0x48, 0xD4, + 0x92, 0xF4, 0xE5, 0x9A, 0xDA, 0x13, 0x76, 0xFF, + 0x6E, 0x76, 0x6B, 0x71, 0x62, 0x28, 0xB2, 0xEC }, .len = 384 }, @@ -428,15 +428,15 @@ struct snow3g_test_data snow3g_test_case_7 = { }, .cipher_iv = { .data = { - 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, - 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08 + 0xE2, 0x8B, 0xCF, 0x7B, 0xC0, 0x00, 0x00, 0x00, + 0xE2, 0x8B, 0xCF, 0x7B, 0xC0, 0x00, 0x00, 0x00 }, .len = 16 }, .auth_iv = { .data = { - 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + 0x36, 0xAF, 0x61, 0x44, 0x98, 0x38, 0xF0, 0x3A, + 0x36, 0xAF, 0x61, 0x44, 0x98, 0x38, 0xF0, 0x3A }, .len = 16 }, @@ -457,28 +457,28 @@ struct snow3g_test_data snow3g_test_case_7 = { 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, - 0x5A, 0x5A, 0x5A, 0x5A, 0xF1, 0x9E, 0x2B, 0x6F, + 0x5A, 0x5A, 0x5A, 0x5A, 0xBB, 0x2B, 0x8B, 0x15, }, .len = 128 << 3 }, .ciphertext = { .data = { - 0x5A, 0x5A, 0xE4, 0xAD, 0x29, 0xA2, 0x6A, 0xA6, - 0x20, 0x1D, 0xCD, 0x08, 0x50, 0xD6, 0xE6, 0x47, - 0xBC, 0x88, 0x08, 0x01, 0x17, 0xFA, 0x47, 0x5B, - 0x90, 0x40, 0xBA, 0x0C, 0xB5, 0x58, 0xF3, 0x0C, - 0xA0, 0xD4, 0x98, 0x83, 0x1B, 0xCE, 0x54, 0xE3, - 0x29, 0x00, 0x3C, 0xA4, 0xAD, 0x74, 0xEE, 0x05, - 0xA3, 0x6C, 0xD4, 0xAC, 0xC6, 0x30, 0x33, 0xC9, - 0x37, 0x57, 0x41, 0x9B, 0xD4, 0x73, 0xB9, 0x77, - 0x70, 0x8B, 0x63, 0xDD, 0x22, 0xB8, 0xE1, 0x85, - 0xB2, 0x92, 0x7C, 0x37, 0xD3, 0x2E, 0xD9, 0xF4, - 0x4A, 0x69, 0x25, 0x30, 0xE3, 0x5B, 0x8B, 0xF6, - 0x0F, 0xDE, 0x0B, 0x92, 0xD5, 0x25, 0x52, 0x6D, - 0x26, 0xEB, 0x2F, 0x8A, 0x3B, 0x8B, 0x38, 0xE2, - 0x48, 0xD3, 0x4A, 0x98, 0xF7, 0x3A, 0xC2, 0x46, - 0x69, 0x8D, 0x73, 0x3E, 0x57, 0x88, 0x2C, 0x80, - 0xF0, 0xF2, 0x75, 0xB8, 0x7D, 0x27, 0xC6, 0xDA, + 0x5A, 0x5A, 0x8A, 0x35, 0xF7, 0x36, 0xDA, 0xD7, + 0xC4, 0x2C, 0x10, 0xEA, 0x92, 0x9C, 0x00, 0xF0, + 0xAE, 0x35, 0x5E, 0x8D, 0xB6, 0x88, 0x30, 0x66, + 0x74, 0x8B, 0xA2, 0x82, 0x5C, 0xA7, 0xF3, 0x54, + 0x75, 0x02, 0xA9, 0x90, 0x6B, 0x4B, 0x6A, 0x63, + 0xFF, 0x4B, 0x08, 0xFE, 0x11, 0x3C, 0x5A, 0x53, + 0xEE, 0x68, 0x14, 0x41, 0x17, 0xCD, 0x7B, 0x27, + 0x88, 0xAF, 0x99, 0xE2, 0x9C, 0x86, 0x42, 0x12, + 0x97, 0x93, 0xF0, 0xE6, 0xE2, 0xB2, 0x2D, 0xDA, + 0x2C, 0x59, 0xB0, 0xA7, 0x09, 0xF6, 0x32, 0xC0, + 0x35, 0x9A, 0xD3, 0xBA, 0xDC, 0x8F, 0x2E, 0x18, + 0x97, 0x87, 0x44, 0xD6, 0x43, 0xFA, 0x86, 0x5A, + 0xB0, 0xA2, 0x5A, 0xB8, 0x5F, 0x57, 0xE3, 0x2F, + 0x73, 0x9C, 0x01, 0x3A, 0x02, 0x08, 0x8C, 0xEB, + 0xA0, 0x5D, 0x74, 0x58, 0x5A, 0xA1, 0x58, 0x17, + 0x5E, 0x86, 0x96, 0xE6, 0x9C, 0xEE, 0x8C, 0xA8 }, .len = 128 << 3 @@ -493,7 +493,7 @@ struct snow3g_test_data snow3g_test_case_7 = { }, .digest = { .data = { - 0x7D, 0x27, 0xC6, 0xDA + 0x9C, 0xEE, 0x8C, 0xA8 }, .len = 4, .offset_bytes = 124 @@ -520,15 +520,15 @@ struct snow3g_test_data snow3g_auth_cipher_test_case_2 = { }, .cipher_iv = { .data = { - 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, - 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08 + 0xFA, 0x55, 0x6B, 0x26, 0x1C, 0x00, 0x00, 0x00, + 0xFA, 0x55, 0x6B, 0x26, 0x1C, 0x00, 0x00, 0x00 }, .len = 16 }, .auth_iv = { .data = { - 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + 0x3E, 0xDC, 0x87, 0xE2, 0xA4, 0xF2, 0xD8, 0xE2, + 0x3E, 0xDC, 0x87, 0xE2, 0xA4, 0xF2, 0xD8, 0xE2 }, .len = 16 }, @@ -556,22 +556,22 @@ struct snow3g_test_data snow3g_auth_cipher_test_case_2 = { }, .ciphertext = { .data = { - 0x5A, 0x5A, 0xE4, 0xAD, 0x29, 0xA2, 0x6A, 0xA6, - 0x20, 0x1D, 0xCD, 0x08, 0x50, 0xD6, 0xE6, 0x47, - 0xBC, 0x88, 0x08, 0x01, 0x17, 0xFA, 0x47, 0x5B, - 0x90, 0x40, 0xBA, 0x0C, 0xB5, 0x58, 0xF3, 0x0C, - 0xA0, 0xD4, 0x98, 0x83, 0x1B, 0xCE, 0x54, 0xE3, - 0x29, 0x00, 0x3C, 0xA4, 0xAD, 0x74, 0xEE, 0x05, - 0xA3, 0x6C, 0xD4, 0xAC, 0xC6, 0x30, 0x33, 0xC9, - 0x37, 0x57, 0x41, 0x9B, 0xD4, 0x73, 0xB9, 0x77, - 0x70, 0x8B, 0x63, 0xDD, 0x22, 0xB8, 0xE1, 0x85, - 0xB2, 0x92, 0x7C, 0x37, 0xD3, 0x2E, 0xD9, 0xF4, - 0x4A, 0x69, 0x25, 0x30, 0xE3, 0x5B, 0x8B, 0xF6, - 0x0F, 0xDE, 0x0B, 0x92, 0xD5, 0x25, 0x52, 0x6D, - 0x26, 0xEB, 0x2F, 0x8A, 0x3B, 0x8B, 0x38, 0xE2, - 0x48, 0xD3, 0x4A, 0x98, 0xF7, 0x3A, 0xC2, 0x46, - 0x69, 0x8D, 0x73, 0x3E, 0x57, 0x88, 0x2C, 0x80, - 0xF0, 0xF2, 0x75, 0xB8, 0x7D, 0x27, 0xC6, 0xDA, + 0x5A, 0x5A, 0xCF, 0xCF, 0x3D, 0x11, 0xBF, 0xD9, + 0xC3, 0x7F, 0x7C, 0xA8, 0x1A, 0x9F, 0x9F, 0x34, + 0xC5, 0x6E, 0x1B, 0x2C, 0xE0, 0x81, 0x4B, 0x66, + 0x87, 0xCB, 0xD5, 0x61, 0x04, 0xED, 0xBC, 0x69, + 0x79, 0x86, 0x73, 0x48, 0x69, 0x4A, 0xBA, 0x55, + 0x44, 0x6C, 0xEF, 0xD9, 0x34, 0x61, 0x59, 0x67, + 0x80, 0x4E, 0x03, 0x95, 0x0A, 0xA1, 0x6C, 0xBA, + 0x74, 0xBD, 0xAF, 0x11, 0x4B, 0xE6, 0x98, 0x61, + 0x4E, 0xD4, 0x3E, 0xE4, 0x99, 0x55, 0x5C, 0x3A, + 0x8C, 0x3E, 0xC0, 0x01, 0x6E, 0x15, 0xE1, 0x0E, + 0x71, 0x4C, 0x89, 0x43, 0x8A, 0x48, 0x69, 0x6D, + 0x02, 0x10, 0xC6, 0x54, 0x37, 0x18, 0xAA, 0x10, + 0x90, 0x80, 0x0B, 0x69, 0x08, 0xB4, 0xF9, 0x4D, + 0xD1, 0x2E, 0x43, 0xD9, 0x92, 0xAF, 0x06, 0x4A, + 0xAF, 0x26, 0x25, 0x77, 0x37, 0xD0, 0xFC, 0x3C, + 0xA0, 0xCB, 0xAF, 0x06, 0x95, 0x26, 0x30, 0x38, }, .len = 128 << 3 @@ -586,7 +586,7 @@ struct snow3g_test_data snow3g_auth_cipher_test_case_2 = { }, .digest = { .data = { - 0x7D, 0x27, 0xC6, 0xDA + 0x95, 0x26, 0x30, 0x38 }, .len = 4, .offset_bytes = 124 @@ -613,15 +613,15 @@ struct snow3g_test_data snow3g_auth_cipher_test_case_3 = { }, .cipher_iv = { .data = { - 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, - 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08 + 0x39, 0x8A, 0x59, 0xB4, 0x2C, 0x00, 0x00, 0x00, + 0x39, 0x8A, 0x59, 0xB4, 0x2C, 0x00, 0x00, 0x00 }, .len = 16 }, .auth_iv = { .data = { - 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + 0x29, 0x6F, 0x39, 0x3C, 0x6B, 0x22, 0x77, 0x37, + 0x29, 0x6F, 0x39, 0x3C, 0x6B, 0x22, 0x77, 0x37 }, .len = 16 }, @@ -636,10 +636,10 @@ struct snow3g_test_data snow3g_auth_cipher_test_case_3 = { }, .ciphertext = { .data = { - 0x5A, 0x5A, 0xE4, 0xAD, 0x29, 0xA2, 0x6A, 0xA6, - 0x20, 0x1D, 0xCD, 0x08, 0x50, 0xD6, 0xE6, 0x47, - 0xBC, 0x88, 0x08, 0x01, 0x17, 0xFA, 0x47, 0x5B, - 0x90, 0x40, 0xBA, 0x0C, 0xBA, 0x6D, 0x6A, 0x5E, + 0x5A, 0x5A, 0x93, 0xB0, 0x3F, 0xA4, 0xEB, 0xD4, + 0x51, 0x12, 0x3B, 0x95, 0x93, 0x12, 0xBF, 0xBE, + 0xF2, 0xFE, 0xA5, 0xAE, 0xE7, 0xF4, 0x80, 0x3E, + 0xB2, 0xD1, 0xFF, 0x5F, 0xD9, 0x32, 0x72, 0xFE, }, .len = 32 << 3 }, @@ -653,7 +653,7 @@ struct snow3g_test_data snow3g_auth_cipher_test_case_3 = { }, .digest = { .data = { - 0xBA, 0x6D, 0x6A, 0x5E + 0xD9, 0x32, 0x72, 0xFE }, .len = 4, .offset_bytes = 28 @@ -680,15 +680,15 @@ struct snow3g_test_data snow3g_auth_cipher_partial_digest_encryption = { }, .cipher_iv = { .data = { - 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, - 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08 + 0x72, 0xA4, 0xF2, 0x0F, 0x48, 0x00, 0x00, 0x00, + 0x72, 0xA4, 0xF2, 0x0F, 0x48, 0x00, 0x00, 0x00 }, .len = 16 }, .auth_iv = { .data = { - 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + 0x14, 0x79, 0x3E, 0x41, 0x03, 0x97, 0xE8, 0xFD, + 0x14, 0x79, 0x3E, 0x41, 0x03, 0x97, 0xE8, 0xFD }, .len = 16 }, @@ -704,9 +704,9 @@ struct snow3g_test_data snow3g_auth_cipher_partial_digest_encryption = { .ciphertext = { .data = { 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, - 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0xE4, 0xAD, - 0x29, 0xA2, 0x6A, 0xA6, 0x20, 0x1D, 0xCD, 0x08, - 0x50, 0xD6, 0xE6, 0x47, 0xB3, 0xBD, 0xC3, 0x08 + 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0xA2, 0xB7, + 0xDF, 0xA7, 0x98, 0xA1, 0xD8, 0xD4, 0x9B, 0x6E, + 0x2C, 0x7A, 0x66, 0x15, 0xCC, 0x4C, 0xE5, 0xE0 }, .len = 32 << 3 }, @@ -720,7 +720,7 @@ struct snow3g_test_data snow3g_auth_cipher_partial_digest_encryption = { }, .digest = { .data = { - 0xB3, 0xBD, 0xC3, 0x08 + 0xCC, 0x4C, 0xE5, 0xE0 }, .len = 4, .offset_bytes = 28 -- 2.25.1 ^ permalink raw reply [flat|nested] 7+ messages in thread
* RE: [EXT] [PATCH 2/2] test/crypto: fix snow3g test vector IV format 2022-06-23 14:42 ` [PATCH 2/2] test/crypto: fix snow3g " Ciara Power @ 2022-06-27 6:00 ` Tejasree Kondoj 0 siblings, 0 replies; 7+ messages in thread From: Tejasree Kondoj @ 2022-06-27 6:00 UTC (permalink / raw) To: Ciara Power, Akhil Goyal, Fan Zhang Cc: dev, kai.ji, pablo.de.lara.guarch, deepak.k.jain, lukaszx.krakowiak, stable Acked-by: Tejasree Kondoj <ktejasree@marvell.com> > -----Original Message----- > From: Ciara Power <ciara.power@intel.com> > Sent: Thursday, June 23, 2022 8:13 PM > To: Akhil Goyal <gakhil@marvell.com>; Fan Zhang > <roy.fan.zhang@intel.com> > Cc: dev@dpdk.org; kai.ji@intel.com; pablo.de.lara.guarch@intel.com; > Tejasree Kondoj <ktejasree@marvell.com>; Ciara Power > <ciara.power@intel.com>; deepak.k.jain@intel.com; > lukaszx.krakowiak@intel.com; stable@dpdk.org > Subject: [EXT] [PATCH 2/2] test/crypto: fix snow3g test vector IV format > > External Email > > ---------------------------------------------------------------------- > Some of the cipher and authentication IVs did not follow the spec for > SNOW3G algorithm [1]. > > Cipher IVs must have the last 3 bytes of each 8 byte block as 0x0. > IV[4] and IV[12] must have the last 2 bits set to 0. > Each 8 byte block is repeated. > > Auth IVs must also have a repeated 8 byte block. > IV[8] and IV[14] may have a flipped bit based on direction. > > [1] https://urldefense.proofpoint.com/v2/url?u=https- > 3A__www.gsma.com_aboutus_wp- > 2Dcontent_uploads_2014_12_uea2uia2d1v21.pdf&d=DwIDAg&c=nKjWec2b6 > R0mOyPaz7xtfQ&r=NjpqGUAf6Xc0ZLzxCvv4idf8zRFeSJHioNlG1Wif1Gs&m=W5 > E7AmIF8Aa_ttMpK850Xe-TbrKbdKU8KakdVPTXBxeQyxGLAD_VoFfwdjc_1hn- > &s=YkfBB-_8R5LDn_vBmEhRNUKeIom1lSMXP3ujAU8V72k&e= > > Fixes: 8bdf665fe6c0 ("app/test: add SNOW 3G") > Fixes: 24342ade2c9d ("test/crypto: check SNOW3G when digest is > encrypted") > Fixes: 02ed7b3871d6 ("test/crypto: add SNOW3G test cases for auth-cipher") > Fixes: 11c5485bb276 ("test/crypto: add scatter-gather tests for IP and OOP") > Cc: deepak.k.jain@intel.com > Cc: lukaszx.krakowiak@intel.com > Cc: stable@dpdk.org > > Signed-off-by: Ciara Power <ciara.power@intel.com> > --- > app/test/test_cryptodev_snow3g_test_vectors.h | 142 +++++++++--------- > 1 file changed, 71 insertions(+), 71 deletions(-) > > diff --git a/app/test/test_cryptodev_snow3g_test_vectors.h > b/app/test/test_cryptodev_snow3g_test_vectors.h > index bbe05662be..b49a07bcf2 100644 > --- a/app/test/test_cryptodev_snow3g_test_vectors.h > +++ b/app/test/test_cryptodev_snow3g_test_vectors.h > @@ -138,11 +138,11 @@ struct snow3g_test_data snow3g_test_case_2 = { > .len = 16 > }, > .cipher_iv = { > - .data = { > + .data = { > 0xE2, 0x8B, 0xCF, 0x7B, 0xC0, 0x00, 0x00, 0x00, > 0xE2, 0x8B, 0xCF, 0x7B, 0xC0, 0x00, 0x00, 0x00 > }, > - .len = 16 > + .len = 16 > }, > .plaintext = { > .data = { > @@ -359,8 +359,8 @@ struct snow3g_test_data > snow3g_auth_cipher_test_case_1 = { > }, > .cipher_iv = { > .data = { > - 0x14, 0x79, 0x3E, 0x41, 0x03, 0x97, 0xE8, 0xFD, > - 0x94, 0x79, 0x3E, 0x41, 0x03, 0x97, 0x68, 0xFD > + 0x72, 0xA4, 0xF2, 0x0F, 0x48, 0x00, 0x00, 0x00, > + 0x72, 0xA4, 0xF2, 0x0F, 0x48, 0x00, 0x00, 0x00 > }, > .len = 16 > }, > @@ -383,13 +383,13 @@ struct snow3g_test_data > snow3g_auth_cipher_test_case_1 = { > .len = 384 > }, > .ciphertext = { > - .data = { > - 0x95, 0x2E, 0x5A, 0xE1, 0x50, 0xB8, 0x59, 0x2A, > - 0x9B, 0xA0, 0x38, 0xA9, 0x8E, 0x2F, 0xED, 0xAB, > - 0xFD, 0xC8, 0x3B, 0x47, 0x46, 0x0B, 0x50, 0x16, > - 0xEC, 0x88, 0x45, 0xB6, 0x05, 0xC7, 0x54, 0xF8, > - 0xBD, 0x91, 0xAA, 0xB6, 0xA4, 0xDC, 0x64, 0xB4, > - 0xCB, 0xEB, 0x97, 0x06, 0x4C, 0xF7, 0x02, 0x3D > + .data = { > + 0x86, 0x4F, 0x4D, 0xE8, 0x86, 0xE6, 0x3E, 0x66, > + 0x52, 0x97, 0xC7, 0x62, 0xAE, 0x8E, 0xA2, 0xDB, > + 0x01, 0xD6, 0x33, 0xA9, 0xA4, 0xCE, 0x02, 0xD5, > + 0xC2, 0xC5, 0x5F, 0x90, 0xE0, 0x89, 0x48, 0xD4, > + 0x92, 0xF4, 0xE5, 0x9A, 0xDA, 0x13, 0x76, 0xFF, > + 0x6E, 0x76, 0x6B, 0x71, 0x62, 0x28, 0xB2, 0xEC > }, > .len = 384 > }, > @@ -428,15 +428,15 @@ struct snow3g_test_data snow3g_test_case_7 = { > }, > .cipher_iv = { > .data = { > - 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, > - 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08 > + 0xE2, 0x8B, 0xCF, 0x7B, 0xC0, 0x00, 0x00, 0x00, > + 0xE2, 0x8B, 0xCF, 0x7B, 0xC0, 0x00, 0x00, 0x00 > }, > .len = 16 > }, > .auth_iv = { > .data = { > - 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, > - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 > + 0x36, 0xAF, 0x61, 0x44, 0x98, 0x38, 0xF0, 0x3A, > + 0x36, 0xAF, 0x61, 0x44, 0x98, 0x38, 0xF0, 0x3A > }, > .len = 16 > }, > @@ -457,28 +457,28 @@ struct snow3g_test_data snow3g_test_case_7 = { > 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, > 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, > 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, > - 0x5A, 0x5A, 0x5A, 0x5A, 0xF1, 0x9E, 0x2B, 0x6F, > + 0x5A, 0x5A, 0x5A, 0x5A, 0xBB, 0x2B, 0x8B, 0x15, > }, > .len = 128 << 3 > }, > .ciphertext = { > .data = { > - 0x5A, 0x5A, 0xE4, 0xAD, 0x29, 0xA2, 0x6A, 0xA6, > - 0x20, 0x1D, 0xCD, 0x08, 0x50, 0xD6, 0xE6, 0x47, > - 0xBC, 0x88, 0x08, 0x01, 0x17, 0xFA, 0x47, 0x5B, > - 0x90, 0x40, 0xBA, 0x0C, 0xB5, 0x58, 0xF3, 0x0C, > - 0xA0, 0xD4, 0x98, 0x83, 0x1B, 0xCE, 0x54, 0xE3, > - 0x29, 0x00, 0x3C, 0xA4, 0xAD, 0x74, 0xEE, 0x05, > - 0xA3, 0x6C, 0xD4, 0xAC, 0xC6, 0x30, 0x33, 0xC9, > - 0x37, 0x57, 0x41, 0x9B, 0xD4, 0x73, 0xB9, 0x77, > - 0x70, 0x8B, 0x63, 0xDD, 0x22, 0xB8, 0xE1, 0x85, > - 0xB2, 0x92, 0x7C, 0x37, 0xD3, 0x2E, 0xD9, 0xF4, > - 0x4A, 0x69, 0x25, 0x30, 0xE3, 0x5B, 0x8B, 0xF6, > - 0x0F, 0xDE, 0x0B, 0x92, 0xD5, 0x25, 0x52, 0x6D, > - 0x26, 0xEB, 0x2F, 0x8A, 0x3B, 0x8B, 0x38, 0xE2, > - 0x48, 0xD3, 0x4A, 0x98, 0xF7, 0x3A, 0xC2, 0x46, > - 0x69, 0x8D, 0x73, 0x3E, 0x57, 0x88, 0x2C, 0x80, > - 0xF0, 0xF2, 0x75, 0xB8, 0x7D, 0x27, 0xC6, 0xDA, > + 0x5A, 0x5A, 0x8A, 0x35, 0xF7, 0x36, 0xDA, 0xD7, > + 0xC4, 0x2C, 0x10, 0xEA, 0x92, 0x9C, 0x00, 0xF0, > + 0xAE, 0x35, 0x5E, 0x8D, 0xB6, 0x88, 0x30, 0x66, > + 0x74, 0x8B, 0xA2, 0x82, 0x5C, 0xA7, 0xF3, 0x54, > + 0x75, 0x02, 0xA9, 0x90, 0x6B, 0x4B, 0x6A, 0x63, > + 0xFF, 0x4B, 0x08, 0xFE, 0x11, 0x3C, 0x5A, 0x53, > + 0xEE, 0x68, 0x14, 0x41, 0x17, 0xCD, 0x7B, 0x27, > + 0x88, 0xAF, 0x99, 0xE2, 0x9C, 0x86, 0x42, 0x12, > + 0x97, 0x93, 0xF0, 0xE6, 0xE2, 0xB2, 0x2D, 0xDA, > + 0x2C, 0x59, 0xB0, 0xA7, 0x09, 0xF6, 0x32, 0xC0, > + 0x35, 0x9A, 0xD3, 0xBA, 0xDC, 0x8F, 0x2E, 0x18, > + 0x97, 0x87, 0x44, 0xD6, 0x43, 0xFA, 0x86, 0x5A, > + 0xB0, 0xA2, 0x5A, 0xB8, 0x5F, 0x57, 0xE3, 0x2F, > + 0x73, 0x9C, 0x01, 0x3A, 0x02, 0x08, 0x8C, 0xEB, > + 0xA0, 0x5D, 0x74, 0x58, 0x5A, 0xA1, 0x58, 0x17, > + 0x5E, 0x86, 0x96, 0xE6, 0x9C, 0xEE, 0x8C, 0xA8 > > }, > .len = 128 << 3 > @@ -493,7 +493,7 @@ struct snow3g_test_data snow3g_test_case_7 = { > }, > .digest = { > .data = { > - 0x7D, 0x27, 0xC6, 0xDA > + 0x9C, 0xEE, 0x8C, 0xA8 > }, > .len = 4, > .offset_bytes = 124 > @@ -520,15 +520,15 @@ struct snow3g_test_data > snow3g_auth_cipher_test_case_2 = { > }, > .cipher_iv = { > .data = { > - 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, > - 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08 > + 0xFA, 0x55, 0x6B, 0x26, 0x1C, 0x00, 0x00, 0x00, > + 0xFA, 0x55, 0x6B, 0x26, 0x1C, 0x00, 0x00, 0x00 > }, > .len = 16 > }, > .auth_iv = { > .data = { > - 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, > - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 > + 0x3E, 0xDC, 0x87, 0xE2, 0xA4, 0xF2, 0xD8, 0xE2, > + 0x3E, 0xDC, 0x87, 0xE2, 0xA4, 0xF2, 0xD8, 0xE2 > }, > .len = 16 > }, > @@ -556,22 +556,22 @@ struct snow3g_test_data > snow3g_auth_cipher_test_case_2 = { > }, > .ciphertext = { > .data = { > - 0x5A, 0x5A, 0xE4, 0xAD, 0x29, 0xA2, 0x6A, 0xA6, > - 0x20, 0x1D, 0xCD, 0x08, 0x50, 0xD6, 0xE6, 0x47, > - 0xBC, 0x88, 0x08, 0x01, 0x17, 0xFA, 0x47, 0x5B, > - 0x90, 0x40, 0xBA, 0x0C, 0xB5, 0x58, 0xF3, 0x0C, > - 0xA0, 0xD4, 0x98, 0x83, 0x1B, 0xCE, 0x54, 0xE3, > - 0x29, 0x00, 0x3C, 0xA4, 0xAD, 0x74, 0xEE, 0x05, > - 0xA3, 0x6C, 0xD4, 0xAC, 0xC6, 0x30, 0x33, 0xC9, > - 0x37, 0x57, 0x41, 0x9B, 0xD4, 0x73, 0xB9, 0x77, > - 0x70, 0x8B, 0x63, 0xDD, 0x22, 0xB8, 0xE1, 0x85, > - 0xB2, 0x92, 0x7C, 0x37, 0xD3, 0x2E, 0xD9, 0xF4, > - 0x4A, 0x69, 0x25, 0x30, 0xE3, 0x5B, 0x8B, 0xF6, > - 0x0F, 0xDE, 0x0B, 0x92, 0xD5, 0x25, 0x52, 0x6D, > - 0x26, 0xEB, 0x2F, 0x8A, 0x3B, 0x8B, 0x38, 0xE2, > - 0x48, 0xD3, 0x4A, 0x98, 0xF7, 0x3A, 0xC2, 0x46, > - 0x69, 0x8D, 0x73, 0x3E, 0x57, 0x88, 0x2C, 0x80, > - 0xF0, 0xF2, 0x75, 0xB8, 0x7D, 0x27, 0xC6, 0xDA, > + 0x5A, 0x5A, 0xCF, 0xCF, 0x3D, 0x11, 0xBF, 0xD9, > + 0xC3, 0x7F, 0x7C, 0xA8, 0x1A, 0x9F, 0x9F, 0x34, > + 0xC5, 0x6E, 0x1B, 0x2C, 0xE0, 0x81, 0x4B, 0x66, > + 0x87, 0xCB, 0xD5, 0x61, 0x04, 0xED, 0xBC, 0x69, > + 0x79, 0x86, 0x73, 0x48, 0x69, 0x4A, 0xBA, 0x55, > + 0x44, 0x6C, 0xEF, 0xD9, 0x34, 0x61, 0x59, 0x67, > + 0x80, 0x4E, 0x03, 0x95, 0x0A, 0xA1, 0x6C, 0xBA, > + 0x74, 0xBD, 0xAF, 0x11, 0x4B, 0xE6, 0x98, 0x61, > + 0x4E, 0xD4, 0x3E, 0xE4, 0x99, 0x55, 0x5C, 0x3A, > + 0x8C, 0x3E, 0xC0, 0x01, 0x6E, 0x15, 0xE1, 0x0E, > + 0x71, 0x4C, 0x89, 0x43, 0x8A, 0x48, 0x69, 0x6D, > + 0x02, 0x10, 0xC6, 0x54, 0x37, 0x18, 0xAA, 0x10, > + 0x90, 0x80, 0x0B, 0x69, 0x08, 0xB4, 0xF9, 0x4D, > + 0xD1, 0x2E, 0x43, 0xD9, 0x92, 0xAF, 0x06, 0x4A, > + 0xAF, 0x26, 0x25, 0x77, 0x37, 0xD0, 0xFC, 0x3C, > + 0xA0, 0xCB, 0xAF, 0x06, 0x95, 0x26, 0x30, 0x38, > > }, > .len = 128 << 3 > @@ -586,7 +586,7 @@ struct snow3g_test_data > snow3g_auth_cipher_test_case_2 = { > }, > .digest = { > .data = { > - 0x7D, 0x27, 0xC6, 0xDA > + 0x95, 0x26, 0x30, 0x38 > }, > .len = 4, > .offset_bytes = 124 > @@ -613,15 +613,15 @@ struct snow3g_test_data > snow3g_auth_cipher_test_case_3 = { > }, > .cipher_iv = { > .data = { > - 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, > - 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08 > + 0x39, 0x8A, 0x59, 0xB4, 0x2C, 0x00, 0x00, 0x00, > + 0x39, 0x8A, 0x59, 0xB4, 0x2C, 0x00, 0x00, 0x00 > }, > .len = 16 > }, > .auth_iv = { > .data = { > - 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, > - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 > + 0x29, 0x6F, 0x39, 0x3C, 0x6B, 0x22, 0x77, 0x37, > + 0x29, 0x6F, 0x39, 0x3C, 0x6B, 0x22, 0x77, 0x37 > }, > .len = 16 > }, > @@ -636,10 +636,10 @@ struct snow3g_test_data > snow3g_auth_cipher_test_case_3 = { > }, > .ciphertext = { > .data = { > - 0x5A, 0x5A, 0xE4, 0xAD, 0x29, 0xA2, 0x6A, 0xA6, > - 0x20, 0x1D, 0xCD, 0x08, 0x50, 0xD6, 0xE6, 0x47, > - 0xBC, 0x88, 0x08, 0x01, 0x17, 0xFA, 0x47, 0x5B, > - 0x90, 0x40, 0xBA, 0x0C, 0xBA, 0x6D, 0x6A, 0x5E, > + 0x5A, 0x5A, 0x93, 0xB0, 0x3F, 0xA4, 0xEB, 0xD4, > + 0x51, 0x12, 0x3B, 0x95, 0x93, 0x12, 0xBF, 0xBE, > + 0xF2, 0xFE, 0xA5, 0xAE, 0xE7, 0xF4, 0x80, 0x3E, > + 0xB2, 0xD1, 0xFF, 0x5F, 0xD9, 0x32, 0x72, 0xFE, > }, > .len = 32 << 3 > }, > @@ -653,7 +653,7 @@ struct snow3g_test_data > snow3g_auth_cipher_test_case_3 = { > }, > .digest = { > .data = { > - 0xBA, 0x6D, 0x6A, 0x5E > + 0xD9, 0x32, 0x72, 0xFE > }, > .len = 4, > .offset_bytes = 28 > @@ -680,15 +680,15 @@ struct snow3g_test_data > snow3g_auth_cipher_partial_digest_encryption = { > }, > .cipher_iv = { > .data = { > - 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, > - 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08 > + 0x72, 0xA4, 0xF2, 0x0F, 0x48, 0x00, 0x00, 0x00, > + 0x72, 0xA4, 0xF2, 0x0F, 0x48, 0x00, 0x00, 0x00 > }, > .len = 16 > }, > .auth_iv = { > .data = { > - 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, > - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 > + 0x14, 0x79, 0x3E, 0x41, 0x03, 0x97, 0xE8, 0xFD, > + 0x14, 0x79, 0x3E, 0x41, 0x03, 0x97, 0xE8, 0xFD > }, > .len = 16 > }, > @@ -704,9 +704,9 @@ struct snow3g_test_data > snow3g_auth_cipher_partial_digest_encryption = { > .ciphertext = { > .data = { > 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, > - 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0xE4, 0xAD, > - 0x29, 0xA2, 0x6A, 0xA6, 0x20, 0x1D, 0xCD, 0x08, > - 0x50, 0xD6, 0xE6, 0x47, 0xB3, 0xBD, 0xC3, 0x08 > + 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0xA2, 0xB7, > + 0xDF, 0xA7, 0x98, 0xA1, 0xD8, 0xD4, 0x9B, 0x6E, > + 0x2C, 0x7A, 0x66, 0x15, 0xCC, 0x4C, 0xE5, 0xE0 > }, > .len = 32 << 3 > }, > @@ -720,7 +720,7 @@ struct snow3g_test_data > snow3g_auth_cipher_partial_digest_encryption = { > }, > .digest = { > .data = { > - 0xB3, 0xBD, 0xC3, 0x08 > + 0xCC, 0x4C, 0xE5, 0xE0 > }, > .len = 4, > .offset_bytes = 28 > -- > 2.25.1 ^ permalink raw reply [flat|nested] 7+ messages in thread
* RE: [PATCH 0/2] fix wireless algorithm IVs 2022-06-23 14:42 [PATCH 0/2] fix wireless algorithm IVs Ciara Power 2022-06-23 14:42 ` [PATCH 1/2] test/crypto: fix zuc test vector IV format Ciara Power 2022-06-23 14:42 ` [PATCH 2/2] test/crypto: fix snow3g " Ciara Power @ 2022-06-24 7:36 ` De Lara Guarch, Pablo 2022-06-28 9:04 ` [EXT] " Akhil Goyal 3 siblings, 0 replies; 7+ messages in thread From: De Lara Guarch, Pablo @ 2022-06-24 7:36 UTC (permalink / raw) To: Power, Ciara Cc: dev, Ji, Kai, Zhang, Roy Fan, ktejasree, gakhil, Gagandeep Singh, Hemant Agrawal, Anoob Joseph, Ankur Dwivedi, Anoob Joseph, ktejasree > -----Original Message----- > From: Power, Ciara <ciara.power@intel.com> > Sent: Thursday, June 23, 2022 4:43 PM > Cc: dev@dpdk.org; Ji, Kai <kai.ji@intel.com>; Zhang, Roy Fan > <roy.fan.zhang@intel.com>; De Lara Guarch, Pablo > <pablo.de.lara.guarch@intel.com>; ktejasree@marvell.com; > gakhil@marvell.com; Power, Ciara <ciara.power@intel.com> > Subject: [PATCH 0/2] fix wireless algorithm IVs > > Some of the ZUC and Snow3G test vectors did not follow the specification for > the cipher and authentication IVs. > > These are now updated to follow the spec documents: > ZUC 128 spec: https://www.gsma.com/security/wp- > content/uploads/2019/05/EEA3_EIA3_specification_v1_8.pdf > Snow3G spec: https://www.gsma.com/aboutus/wp- > content/uploads/2014/12/uea2uia2d1v21.pdf > > Ciara Power (2): > test/crypto: fix zuc test vector IV format > test/crypto: fix snow3g test vector IV format > > app/test/test_cryptodev_snow3g_test_vectors.h | 142 +++++++++--------- > app/test/test_cryptodev_zuc_test_vectors.h | 54 +++---- > 2 files changed, 98 insertions(+), 98 deletions(-) > > -- > 2.25.1 CC'ing maintainers of the PMDs that support these algorithms, to verify they work for them. Apart from that: Series-acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com> ^ permalink raw reply [flat|nested] 7+ messages in thread
* RE: [EXT] [PATCH 0/2] fix wireless algorithm IVs 2022-06-23 14:42 [PATCH 0/2] fix wireless algorithm IVs Ciara Power ` (2 preceding siblings ...) 2022-06-24 7:36 ` [PATCH 0/2] fix wireless algorithm IVs De Lara Guarch, Pablo @ 2022-06-28 9:04 ` Akhil Goyal 3 siblings, 0 replies; 7+ messages in thread From: Akhil Goyal @ 2022-06-28 9:04 UTC (permalink / raw) To: Ciara Power Cc: dev, kai.ji, roy.fan.zhang, pablo.de.lara.guarch, Tejasree Kondoj > Some of the ZUC and Snow3G test vectors did not follow > the specification for the cipher and authentication IVs. > > Ciara Power (2): > test/crypto: fix zuc test vector IV format > test/crypto: fix snow3g test vector IV format > > app/test/test_cryptodev_snow3g_test_vectors.h | 142 +++++++++--------- > app/test/test_cryptodev_zuc_test_vectors.h | 54 +++---- > 2 files changed, 98 insertions(+), 98 deletions(-) > Series applied to dpdk-next-crypto Thanks. ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2022-06-28 9:04 UTC | newest] Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2022-06-23 14:42 [PATCH 0/2] fix wireless algorithm IVs Ciara Power 2022-06-23 14:42 ` [PATCH 1/2] test/crypto: fix zuc test vector IV format Ciara Power 2022-06-27 6:00 ` [EXT] " Tejasree Kondoj 2022-06-23 14:42 ` [PATCH 2/2] test/crypto: fix snow3g " Ciara Power 2022-06-27 6:00 ` [EXT] " Tejasree Kondoj 2022-06-24 7:36 ` [PATCH 0/2] fix wireless algorithm IVs De Lara Guarch, Pablo 2022-06-28 9:04 ` [EXT] " 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).