DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] examples/fips_validation: fix incorrect CT length string
@ 2020-02-18  9:44 Anoob Joseph
  2020-02-18 10:31 ` [dpdk-dev] [PATCH v2] examples/fips_validation: fix incorrect string for CT length Anoob Joseph
  0 siblings, 1 reply; 6+ messages in thread
From: Anoob Joseph @ 2020-02-18  9:44 UTC (permalink / raw)
  To: Marko Kovacevic, Akhil Goyal, David Marchand
  Cc: Anoob Joseph, Fan Zhang, Narayana Prasad, dev

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: 12f826533ff7 ("examples/fips_validation: fix incorrect string for CT length")

Signed-off-by: Anoob Joseph <anoobj@marvell.com>
---
 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


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [dpdk-dev] [PATCH v2] examples/fips_validation: fix incorrect string for CT length
  2020-02-18  9:44 [dpdk-dev] [PATCH] examples/fips_validation: fix incorrect CT length string Anoob Joseph
@ 2020-02-18 10:31 ` Anoob Joseph
  2020-02-19 10:22   ` Anoob Joseph
  2020-02-20 10:15   ` Akhil Goyal
  0 siblings, 2 replies; 6+ messages in thread
From: Anoob Joseph @ 2020-02-18 10:31 UTC (permalink / raw)
  To: Marko Kovacevic, Akhil Goyal, David Marchand
  Cc: Anoob Joseph, Fan Zhang, Narayana Prasad, dev

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@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


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [dpdk-dev] [PATCH v2] examples/fips_validation: fix incorrect string for CT length
  2020-02-18 10:31 ` [dpdk-dev] [PATCH v2] examples/fips_validation: fix incorrect string for CT length Anoob Joseph
@ 2020-02-19 10:22   ` Anoob Joseph
  2020-02-20 10:15   ` Akhil Goyal
  1 sibling, 0 replies; 6+ messages in thread
From: Anoob Joseph @ 2020-02-19 10:22 UTC (permalink / raw)
  To: Fan Zhang, Akhil Goyal
  Cc: Narayana Prasad Raju Athreya, dev, Anoob Joseph, Marko Kovacevic,
	David Marchand

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@marvell.com>
> Sent: Tuesday, February 18, 2020 4:01 PM
> To: Marko Kovacevic <marko.kovacevic@intel.com>; Akhil Goyal
> <akhil.goyal@nxp.com>; David Marchand <david.marchand@redhat.com>
> Cc: Anoob Joseph <anoobj@marvell.com>; Fan Zhang
> <roy.fan.zhang@intel.com>; Narayana Prasad Raju Athreya
> <pathreya@marvell.com>; dev@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@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


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [dpdk-dev] [PATCH v2] examples/fips_validation: fix incorrect string for CT length
  2020-02-18 10:31 ` [dpdk-dev] [PATCH v2] examples/fips_validation: fix incorrect string for CT length Anoob Joseph
  2020-02-19 10:22   ` Anoob Joseph
@ 2020-02-20 10:15   ` Akhil Goyal
  2020-02-20 10:19     ` David Marchand
  2020-02-20 15:48     ` David Marchand
  1 sibling, 2 replies; 6+ messages in thread
From: Akhil Goyal @ 2020-02-20 10:15 UTC (permalink / raw)
  To: Anoob Joseph, Marko Kovacevic, David Marchand
  Cc: Fan Zhang, Narayana Prasad, dev


> 
> 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@marvell.com>
> ---
> 
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>

Hi David,
Are you picking this patch or is it intended for crypto tree?

Regards,
Akhil

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [dpdk-dev] [PATCH v2] examples/fips_validation: fix incorrect string for CT length
  2020-02-20 10:15   ` Akhil Goyal
@ 2020-02-20 10:19     ` David Marchand
  2020-02-20 15:48     ` David Marchand
  1 sibling, 0 replies; 6+ messages in thread
From: David Marchand @ 2020-02-20 10:19 UTC (permalink / raw)
  To: Akhil Goyal
  Cc: Anoob Joseph, Marko Kovacevic, Fan Zhang, Narayana Prasad, dev

On Thu, Feb 20, 2020 at 11:15 AM Akhil Goyal <akhil.goyal@nxp.com> wrote:
> > 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@marvell.com>
> > ---
> >
> Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
>
> Are you picking this patch or is it intended for crypto tree?

I'll take it.


-- 
David Marchand


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [dpdk-dev] [PATCH v2] examples/fips_validation: fix incorrect string for CT length
  2020-02-20 10:15   ` Akhil Goyal
  2020-02-20 10:19     ` David Marchand
@ 2020-02-20 15:48     ` David Marchand
  1 sibling, 0 replies; 6+ messages in thread
From: David Marchand @ 2020-02-20 15:48 UTC (permalink / raw)
  To: Anoob Joseph
  Cc: Marko Kovacevic, Fan Zhang, Narayana Prasad, Akhil Goyal, dev

On Thu, Feb 20, 2020 at 11:15 AM Akhil Goyal <akhil.goyal@nxp.com> wrote:
> > 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@marvell.com>
> > ---
> >
> Acked-by: Akhil Goyal <akhil.goyal@nxp.com>

Applied, thanks.


-- 
David Marchand


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2020-02-20 15:48 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-18  9:44 [dpdk-dev] [PATCH] examples/fips_validation: fix incorrect CT length string Anoob Joseph
2020-02-18 10:31 ` [dpdk-dev] [PATCH v2] examples/fips_validation: fix incorrect string for CT length Anoob Joseph
2020-02-19 10:22   ` Anoob Joseph
2020-02-20 10:15   ` Akhil Goyal
2020-02-20 10:19     ` David Marchand
2020-02-20 15:48     ` David Marchand

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).