DPDK patches and discussions
 help / color / mirror / Atom feed
From: Shaokai Zhang <felix.zhang@jaguarmicro.com>
To: dev@dpdk.org
Cc: gakhil@marvell.com, fanzhang.oss@gmail.com, stable@dpdk.org,
	Joey Xing <joey.xing@jaguarmicro.com>
Subject: [PATCH] test/crypto: fix the bug of AES-ECB test
Date: Thu, 16 Jan 2025 16:35:48 +0800	[thread overview]
Message-ID: <20250116083548.118-1-felix.zhang@jaguarmicro.com> (raw)

The test vector aes_test_data_19 plaintext is 192 bytes and this vector
is used to test 192-byte plaintext, but test vector plaintext.len
value is incorrectly assigned to 64.

The test vector aes_test_data_20 plaintext length is 256 bytes, but
testcase comment incorrectly describes it as "192-byte plaintext".

Fixes: c94c520b4163 ("crypto/aesni_mb: support AES-ECB")
Cc: stable@dpdk.org

Signed-off-by: Shaokai Zhang <felix.zhang@jaguarmicro.com>
Reviewed-by: Joey Xing <joey.xing@jaguarmicro.com>
---
 app/test/test_cryptodev_aes_test_vectors.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/app/test/test_cryptodev_aes_test_vectors.h b/app/test/test_cryptodev_aes_test_vectors.h
index 7127156cc4..505e603b7e 100644
--- a/app/test/test_cryptodev_aes_test_vectors.h
+++ b/app/test/test_cryptodev_aes_test_vectors.h
@@ -833,11 +833,11 @@ static const struct blockcipher_test_data aes_test_data_19 = {
 	},
 	.plaintext = {
 		.data = plaintext_aes192ecb_192bytes,
-		.len = 64
+		.len = 192
 	},
 	.ciphertext = {
 		.data = ciphertext_aes192ecb_192bytes,
-		.len = 64
+		.len = 192
 	}
 };
 
@@ -5103,7 +5103,7 @@ static const struct blockcipher_test_case aes_cipheronly_test_cases[] = {
 		.op_mask = BLOCKCIPHER_TEST_OP_ENCRYPT,
 	},
 	{
-		.test_descr = "AES-256-ECB Decryption (192-byte plaintext)",
+		.test_descr = "AES-256-ECB Decryption (256-byte plaintext)",
 		.test_data = &aes_test_data_20,
 		.op_mask = BLOCKCIPHER_TEST_OP_DECRYPT,
 	},
-- 
2.47.1.windows.2


                 reply	other threads:[~2025-01-16  8:36 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20250116083548.118-1-felix.zhang@jaguarmicro.com \
    --to=felix.zhang@jaguarmicro.com \
    --cc=dev@dpdk.org \
    --cc=fanzhang.oss@gmail.com \
    --cc=gakhil@marvell.com \
    --cc=joey.xing@jaguarmicro.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).