[dpdk-dev] [PATCH v2] examples/fips_validation: fix incorrect string for CT length

Anoob Joseph anoobj at marvell.com
Wed Feb 19 11:22:46 CET 2020


Hi Fan, Akhil,

Can you review this patch? Without this change, the app would not work for AES-GCM decrypt.

Thanks,
Anoob

> -----Original Message-----
> From: Anoob Joseph <anoobj at marvell.com>
> Sent: Tuesday, February 18, 2020 4:01 PM
> To: Marko Kovacevic <marko.kovacevic at intel.com>; Akhil Goyal
> <akhil.goyal at nxp.com>; David Marchand <david.marchand at redhat.com>
> Cc: Anoob Joseph <anoobj at marvell.com>; Fan Zhang
> <roy.fan.zhang at intel.com>; Narayana Prasad Raju Athreya
> <pathreya at marvell.com>; dev at dpdk.org
> Subject: [PATCH v2] examples/fips_validation: fix incorrect string for CT
> length
> 
> The NIST test vectors use the string 'PTlen' to denote text lengths in case of
> encrypt & decrypt operations. So the same string need to be used while
> parsing PT and CT.
> 
> Fixes: 2adb3b4e7e54 ("examples/fips_validation: fix AES-GCM cipher length
> parsing")
> 
> Signed-off-by: Anoob Joseph <anoobj at marvell.com>
> ---
> 
> v2:
> * Fixed incorrect fixes tag
> 
>  examples/fips_validation/fips_validation_gcm.c | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/examples/fips_validation/fips_validation_gcm.c
> b/examples/fips_validation/fips_validation_gcm.c
> index bc2d37d..47576e9 100644
> --- a/examples/fips_validation/fips_validation_gcm.c
> +++ b/examples/fips_validation/fips_validation_gcm.c
> @@ -19,7 +19,6 @@
>  #define PTLEN_STR	"PTlen = "
>  #define AADLEN_STR	"AADlen = "
>  #define TAGLEN_STR	"Taglen = "
> -#define CTLEN_STR	"CTlen = "
> 
>  #define COUNT_STR	"Count = "
>  #define KEY_STR		"Key = "
> @@ -47,7 +46,10 @@ struct fips_test_callback gcm_interim_vectors[] = {
>  		{KEYLEN_STR, parser_read_uint32_bit_val, &vec.aead.key},
>  		{IVLEN_STR, parser_read_uint32_bit_val, &vec.iv},
>  		{PTLEN_STR, parser_read_uint32_bit_val, &vec.pt},
> -		{CTLEN_STR, parser_read_uint32_bit_val, &vec.ct},
> +		{PTLEN_STR, parser_read_uint32_bit_val, &vec.ct},
> +		/**< The NIST test vectors use 'PTlen' to denote input text
> +		 *  length in case of decrypt & encrypt operations.
> +		 */
>  		{AADLEN_STR, parser_read_uint32_bit_val, &vec.aead.aad},
>  		{TAGLEN_STR, parser_read_uint32_bit_val,
>  				&vec.aead.digest},
> --
> 2.7.4



More information about the dev mailing list