diff mbox series

[v18,1/3] performance: add AES tests to crypto performance tests

Message ID 1516467619-16521-2-git-send-email-odpbot@yandex.ru
State New
Headers show
Series [v18,1/3] performance: add AES tests to crypto performance tests | expand

Commit Message

Github ODP bot Jan. 20, 2018, 5 p.m. UTC
From: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov@linaro.org>


Signed-off-by: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov@linaro.org>

---
/** Email created from pull request 342 (lumag:openssl-ctx)
 ** https://github.com/Linaro/odp/pull/342
 ** Patch: https://github.com/Linaro/odp/pull/342.patch
 ** Base sha: 5a4502fc6bc53e6503169da3028f456b64811a0b
 ** Merge commit sha: c79dfa8a99529acf3d1c96543f78f6c994fc72e7
 **/
 test/performance/odp_crypto.c | 71 ++++++++++++++++++++++++++++++++++++++++++-
 1 file changed, 70 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/test/performance/odp_crypto.c b/test/performance/odp_crypto.c
index 761cc8cff..f6524bc63 100644
--- a/test/performance/odp_crypto.c
+++ b/test/performance/odp_crypto.c
@@ -30,7 +30,7 @@ 
  */
 #define POOL_NUM_PKT  64
 
-static uint8_t test_iv[8] = "01234567";
+static uint8_t test_iv[16] = "0123456789abcdef";
 
 static uint8_t test_key16[16] = { 0x01, 0x02, 0x03, 0x04, 0x05,
 				  0x06, 0x07, 0x08, 0x09, 0x0a,
@@ -38,6 +38,12 @@  static uint8_t test_key16[16] = { 0x01, 0x02, 0x03, 0x04, 0x05,
 				  0x10,
 };
 
+static uint8_t test_key20[20] = { 0x01, 0x02, 0x03, 0x04, 0x05,
+				  0x06, 0x07, 0x08, 0x09, 0x0a,
+				  0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
+				  0x10, 0x11, 0x12, 0x13, 0x14,
+};
+
 static uint8_t test_key24[24] = { 0x01, 0x02, 0x03, 0x04, 0x05,
 				  0x06, 0x07, 0x08, 0x09, 0x0a,
 				  0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
@@ -226,6 +232,69 @@  static crypto_alg_config_t algs_config[] = {
 			.auth_digest_len = 12,
 		},
 	},
+	{
+		.name = "aes-cbc-null",
+		.session = {
+			.cipher_alg = ODP_CIPHER_ALG_AES_CBC,
+			.cipher_key = {
+				.data = test_key16,
+				.length = sizeof(test_key16)
+			},
+			.iv = {
+				.data = test_iv,
+				.length = 16,
+			},
+			.auth_alg = ODP_AUTH_ALG_NULL
+		},
+	},
+	{
+		.name = "aes-cbc-hmac-sha1-96",
+		.session = {
+			.cipher_alg = ODP_CIPHER_ALG_AES_CBC,
+			.cipher_key = {
+				.data = test_key16,
+				.length = sizeof(test_key16)
+			},
+			.iv = {
+				.data = test_iv,
+				.length = 16,
+			},
+			.auth_alg = ODP_AUTH_ALG_SHA1_HMAC,
+			.auth_key = {
+				.data = test_key20,
+				.length = sizeof(test_key20)
+			},
+			.auth_digest_len = 12,
+		},
+	},
+	{
+		.name = "null-hmac-sha1-96",
+		.session = {
+			.cipher_alg = ODP_CIPHER_ALG_NULL,
+			.auth_alg = ODP_AUTH_ALG_SHA1_HMAC,
+			.auth_key = {
+				.data = test_key20,
+				.length = sizeof(test_key20)
+			},
+			.auth_digest_len = 12,
+		},
+	},
+	{
+		.name = "aes-gcm",
+		.session = {
+			.cipher_alg = ODP_CIPHER_ALG_AES_GCM,
+			.cipher_key = {
+				.data = test_key16,
+				.length = sizeof(test_key16)
+			},
+			.iv = {
+				.data = test_iv,
+				.length = 12,
+			},
+			.auth_alg = ODP_AUTH_ALG_AES_GCM,
+			.auth_digest_len = 16,
+		},
+	},
 };
 
 /**