DPDK patches and discussions
 help / color / mirror / Atom feed
From: Tejasree Kondoj <ktejasree@marvell.com>
To: Ciara Power <ciara.power@intel.com>,
	Akhil Goyal <gakhil@marvell.com>,
	Fan Zhang <roy.fan.zhang@intel.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>,
	"kai.ji@intel.com" <kai.ji@intel.com>,
	"pablo.de.lara.guarch@intel.com" <pablo.de.lara.guarch@intel.com>,
	"arkadiuszx.kusztal@intel.com" <arkadiuszx.kusztal@intel.com>,
	"stable@dpdk.org" <stable@dpdk.org>
Subject: RE: [EXT] [PATCH 1/2] test/crypto: fix zuc test vector IV format
Date: Mon, 27 Jun 2022 06:00:09 +0000	[thread overview]
Message-ID: <PH0PR18MB38640A16DF5FF6122E039E0AA8B99@PH0PR18MB3864.namprd18.prod.outlook.com> (raw)
In-Reply-To: <20220623144250.1259901-2-ciara.power@intel.com>

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


  reply	other threads:[~2022-06-27  6:00 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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   ` Tejasree Kondoj [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=PH0PR18MB38640A16DF5FF6122E039E0AA8B99@PH0PR18MB3864.namprd18.prod.outlook.com \
    --to=ktejasree@marvell.com \
    --cc=arkadiuszx.kusztal@intel.com \
    --cc=ciara.power@intel.com \
    --cc=dev@dpdk.org \
    --cc=gakhil@marvell.com \
    --cc=kai.ji@intel.com \
    --cc=pablo.de.lara.guarch@intel.com \
    --cc=roy.fan.zhang@intel.com \
    --cc=stable@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).