examples/fips_validation: fix incorrect CT length string
PATCH 1/1 examples/fips_validation: fix incorrect CT length string
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.
--- examples/fips_validation/fips_validation_gcm.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
examples/fips_validation/fips_validation_gcm.c +4 -2
@@ -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},
Signature · 1 line
2.7.4
PATCH v2 1/1 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.
---
v2:
* Fixed incorrect fixes tag
examples/fips_validation/fips_validation_gcm.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
examples/fips_validation/fips_validation_gcm.c +4 -2
@@ -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},
Signature · 1 line
2.7.4
Re: [dpdk-dev] [PATCH v2] examples/fips_validation: fix incorrect string for CT length
Hi Fan, Akhil,
Can you review this patch? Without this change, the app would not work for AES-GCM decrypt.
Thanks,
Anoob
Quoted 54 lines
-----Original Message-----
From: Anoob Joseph <[email protected]>
Sent: Tuesday, February 18, 2020 4:01 PM
To: Marko Kovacevic <[email protected]>; Akhil Goyal <[email protected]>; David Marchand <[email protected]>
Cc: Anoob Joseph <[email protected]>; Fan Zhang <[email protected]>; Narayana Prasad Raju Athreya <[email protected]>; [email protected]
Subject: [PATCH v2] examples/fips_validation: fix incorrect string for CT lengthThe 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 lengthparsing")
Signed-off-by Anoob Joseph <[email protected]>---
v2:
* Fixed incorrect fixes tagexamples/fips_validation/fips_validation_gcm.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)examples/fips_validation/fips_validation_gcm.c +4
-3@@ -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
Re: [dpdk-dev] [PATCH v2] examples/fips_validation: fix incorrect string for CT length
In reply to Anoob JosephQuoted 6 lines
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.
Quoted 6 lines
Fixes 2adb3b4e7e54 ("examples/fips_validation: fix AES-GCM cipher lengthparsing")
Signed-off-by Anoob Joseph <[email protected]>---
Hi David,
Are you picking this patch or is it intended for crypto tree?
Regards,
Akhil
Re: [dpdk-dev] [PATCH v2] examples/fips_validation: fix incorrect string for CT length
Quoted 7 lines · Akhil Goyal
Quoted 7 lines
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 lengthparsing")
Quoted 6 lines
Quoted 3 lines
Signed-off-by Anoob Joseph <[email protected]>---
Acked-by Akhil Goyal <[email protected]>Are you picking this patch or is it intended for crypto tree?
I'll take it.
Signature · 1 line
David Marchand
David Marchand
AppliedRe: [dpdk-dev] [PATCH v2] examples/fips_validation: fix incorrect string for CT length
In reply to Akhil GoyalQuoted 11 lines · Akhil Goyal
Quoted 10 lines
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 lengthparsing")
Signed-off-by Anoob Joseph <[email protected]>---
Acked-by Akhil Goyal <[email protected]>
Applied, thanks.
Signature · 1 line
David Marchand