From patchwork Fri Sep 11 15:49:26 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Cornu, Marcel D" X-Patchwork-Id: 77443 X-Patchwork-Delegate: gakhil@marvell.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 2A7AFA04BB; Fri, 11 Sep 2020 17:50:00 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 563A21BFCD; Fri, 11 Sep 2020 17:49:59 +0200 (CEST) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id 583C0E07 for ; Fri, 11 Sep 2020 17:49:57 +0200 (CEST) IronPort-SDR: CFw3WduJ+L8QK/cOGZSPLJ0lw1SR8SW/4jP9j15BIlg4YoajXsx+5oUVh9FPm4MqFvab+yYSMB Qy2PU2FyRwFQ== X-IronPort-AV: E=McAfee;i="6000,8403,9741"; a="146478006" X-IronPort-AV: E=Sophos;i="5.76,416,1592895600"; d="scan'208";a="146478006" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Sep 2020 08:49:55 -0700 IronPort-SDR: AdIs36d9IXO7S7RZeKSMmQdwrn5W/PcYuy3jmtcA5GOc6+/qi4q/NCqd8ynCnUaE2VwsX2bX7c Ce2G69yOOclQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.76,416,1592895600"; d="scan'208";a="481368182" Received: from silpixa00400565.ir.intel.com (HELO silpixa00400565.ger.corp.intel.com) ([10.237.222.249]) by orsmga005.jf.intel.com with ESMTP; 11 Sep 2020 08:49:53 -0700 From: Marcel Cornu To: declan.doherty@intel.com, pablo.de.lara.guarch@intel.com Cc: =?unknown-8bit?q?dev=40dpdk=2Eorg=2C?= =?unknown-8bit?b?IOKAnHRvbWFzei5rYW50ZWNraUBpbnRlbC5jb23igJ0s?= =?unknown-8bit?q?_Marcel_Cornu_=3Cmarcel=2Ed=2Ecornu=40intel=2Ecom=3E?= Date: Fri, 11 Sep 2020 16:49:26 +0100 Message-Id: <20200911154926.583459-1-marcel.d.cornu@intel.com> X-Mailer: git-send-email 2.25.4 MIME-Version: 1.0 Subject: [dpdk-dev] [PATCH] crypto/aesni-mb: support AES-ECB X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" This patch adds AES-ECB 128, 192 and 256 support to the aesni_mb PMD. AES-ECB 128, 192 and 256 test vectors added to cryptodev tests. Signed-off-by: Marcel Cornu Acked-by: Pablo de Lara --- app/test/test_cryptodev_aes_test_vectors.h | 730 ++++++++++++++++++ doc/guides/cryptodevs/aesni_mb.rst | 3 + doc/guides/cryptodevs/features/aesni_mb.ini | 3 + doc/guides/rel_notes/release_20_11.rst | 4 + drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c | 6 + .../crypto/aesni_mb/rte_aesni_mb_pmd_ops.c | 18 + 6 files changed, 764 insertions(+) diff --git a/app/test/test_cryptodev_aes_test_vectors.h b/app/test/test_cryptodev_aes_test_vectors.h index f56bbdd4a..c192d75a7 100644 --- a/app/test/test_cryptodev_aes_test_vectors.h +++ b/app/test/test_cryptodev_aes_test_vectors.h @@ -231,6 +231,666 @@ static const uint8_t ciphertext512_aes128cbc[] = { 0xBB, 0xFF, 0xAE, 0xB5, 0x99, 0x6E, 0xCB, 0x0C }; +static const uint8_t plaintext_aes128ecb[] = { + 0x6b, 0xc1, 0xbe, 0xe2, 0x2e, 0x40, 0x9f, 0x96, + 0xe9, 0x3d, 0x7e, 0x11, 0x73, 0x93, 0x17, 0x2a, + 0xae, 0x2d, 0x8a, 0x57, 0x1e, 0x03, 0xac, 0x9c, + 0x9e, 0xb7, 0x6f, 0xac, 0x45, 0xaf, 0x8e, 0x51, + 0x30, 0xc8, 0x1c, 0x46, 0xa3, 0x5c, 0xe4, 0x11, + 0xe5, 0xfb, 0xc1, 0x19, 0x1a, 0x0a, 0x52, 0xef, + 0xf6, 0x9f, 0x24, 0x45, 0xdf, 0x4f, 0x9b, 0x17, + 0xad, 0x2b, 0x41, 0x7b, 0xe6, 0x6c, 0x37, 0x10 +}; + +static const uint8_t ciphertext_aes128ecb[] = { + 0x3a, 0xd7, 0x7b, 0xb4, 0x0d, 0x7a, 0x36, 0x60, + 0xa8, 0x9e, 0xca, 0xf3, 0x24, 0x66, 0xef, 0x97, + 0xf5, 0xd3, 0xd5, 0x85, 0x03, 0xb9, 0x69, 0x9d, + 0xe7, 0x85, 0x89, 0x5a, 0x96, 0xfd, 0xba, 0xaf, + 0x43, 0xb1, 0xcd, 0x7f, 0x59, 0x8e, 0xce, 0x23, + 0x88, 0x1b, 0x00, 0xe3, 0xed, 0x03, 0x06, 0x88, + 0x7b, 0x0c, 0x78, 0x5e, 0x27, 0xe8, 0xad, 0x3f, + 0x82, 0x23, 0x20, 0x71, 0x04, 0x72, 0x5d, 0xd4 +}; + +static const uint8_t plaintext_aes192ecb[] = { + 0x6b, 0xc1, 0xbe, 0xe2, 0x2e, 0x40, 0x9f, 0x96, + 0xe9, 0x3d, 0x7e, 0x11, 0x73, 0x93, 0x17, 0x2a, + 0xae, 0x2d, 0x8a, 0x57, 0x1e, 0x03, 0xac, 0x9c, + 0x9e, 0xb7, 0x6f, 0xac, 0x45, 0xaf, 0x8e, 0x51, + 0x30, 0xc8, 0x1c, 0x46, 0xa3, 0x5c, 0xe4, 0x11, + 0xe5, 0xfb, 0xc1, 0x19, 0x1a, 0x0a, 0x52, 0xef, + 0xf6, 0x9f, 0x24, 0x45, 0xdf, 0x4f, 0x9b, 0x17, + 0xad, 0x2b, 0x41, 0x7b, 0xe6, 0x6c, 0x37, 0x10 +}; + +static const uint8_t ciphertext_aes192ecb[] = { + 0xbd, 0x33, 0x4f, 0x1d, 0x6e, 0x45, 0xf2, 0x5f, + 0xf7, 0x12, 0xa2, 0x14, 0x57, 0x1f, 0xa5, 0xcc, + 0x97, 0x41, 0x04, 0x84, 0x6d, 0x0a, 0xd3, 0xad, + 0x77, 0x34, 0xec, 0xb3, 0xec, 0xee, 0x4e, 0xef, + 0xef, 0x7a, 0xfd, 0x22, 0x70, 0xe2, 0xe6, 0x0a, + 0xdc, 0xe0, 0xba, 0x2f, 0xac, 0xe6, 0x44, 0x4e, + 0x9a, 0x4b, 0x41, 0xba, 0x73, 0x8d, 0x6c, 0x72, + 0xfb, 0x16, 0x69, 0x16, 0x03, 0xc1, 0x8e, 0x0e +}; + +static const uint8_t plaintext_aes256ecb[] = { + 0x6b, 0xc1, 0xbe, 0xe2, 0x2e, 0x40, 0x9f, 0x96, + 0xe9, 0x3d, 0x7e, 0x11, 0x73, 0x93, 0x17, 0x2a, + 0xae, 0x2d, 0x8a, 0x57, 0x1e, 0x03, 0xac, 0x9c, + 0x9e, 0xb7, 0x6f, 0xac, 0x45, 0xaf, 0x8e, 0x51, + 0x30, 0xc8, 0x1c, 0x46, 0xa3, 0x5c, 0xe4, 0x11, + 0xe5, 0xfb, 0xc1, 0x19, 0x1a, 0x0a, 0x52, 0xef, + 0xf6, 0x9f, 0x24, 0x45, 0xdf, 0x4f, 0x9b, 0x17, + 0xad, 0x2b, 0x41, 0x7b, 0xe6, 0x6c, 0x37, 0x10 +}; + +static const uint8_t ciphertext_aes256ecb[] = { + 0xf3, 0xee, 0xd1, 0xbd, 0xb5, 0xd2, 0xa0, 0x3c, + 0x06, 0x4b, 0x5a, 0x7e, 0x3d, 0xb1, 0x81, 0xf8, + 0x59, 0x1c, 0xcb, 0x10, 0xd4, 0x10, 0xed, 0x26, + 0xdc, 0x5b, 0xa7, 0x4a, 0x31, 0x36, 0x28, 0x70, + 0xb6, 0xed, 0x21, 0xb9, 0x9c, 0xa6, 0xf4, 0xf9, + 0xf1, 0x53, 0xe7, 0xb1, 0xbe, 0xaf, 0xed, 0x1d, + 0x23, 0x30, 0x4b, 0x7a, 0x39, 0xf9, 0xf3, 0xff, + 0x06, 0x7d, 0x8d, 0x8f, 0x9e, 0x24, 0xec, 0xc7 +}; + +static const uint8_t plaintext_aes128ecb_128bytes[] = { + 0xf7, 0xcd, 0x12, 0xfb, 0x4f, 0x8e, 0x50, 0xab, + 0x35, 0x8e, 0x56, 0xf9, 0x83, 0x53, 0x9a, 0x1a, + 0xfc, 0x47, 0x3c, 0x96, 0x01, 0xfe, 0x01, 0x87, + 0xd5, 0xde, 0x46, 0x24, 0x5c, 0x62, 0x8f, 0xba, + 0xba, 0x91, 0x17, 0x8d, 0xba, 0x5a, 0x79, 0xb1, + 0x57, 0x05, 0x4d, 0x08, 0xba, 0x1f, 0x30, 0xd3, + 0x80, 0x40, 0xe9, 0x37, 0xb0, 0xd6, 0x34, 0x87, + 0x33, 0xdd, 0xc0, 0x5b, 0x2d, 0x58, 0x1d, 0x2a, + 0x7b, 0xb6, 0xe3, 0xd0, 0xc8, 0xa0, 0x7a, 0x69, + 0xc8, 0x5d, 0x10, 0xa2, 0xc3, 0x39, 0xca, 0xaf, + 0x40, 0xdc, 0xc7, 0xcb, 0xff, 0x18, 0x7d, 0x51, + 0x06, 0x28, 0x28, 0x1f, 0x3a, 0x9c, 0x18, 0x7d, + 0x5b, 0xb5, 0xe9, 0x20, 0xc2, 0xae, 0x17, 0x7f, + 0xd1, 0x65, 0x7a, 0x75, 0xcf, 0x21, 0xa0, 0x1e, + 0x17, 0x1b, 0xf7, 0xe8, 0x62, 0x5f, 0xaf, 0x34, + 0x7f, 0xd8, 0x18, 0x4a, 0x94, 0xf2, 0x33, 0x90 +}; + +static const uint8_t ciphertext_aes128ecb_128bytes[] = { + 0x48, 0xa0, 0xe8, 0x0a, 0x89, 0x99, 0xab, 0xb5, + 0x66, 0x6d, 0x68, 0x23, 0x43, 0x40, 0x1f, 0x26, + 0xac, 0x52, 0xc4, 0x7b, 0x09, 0x0a, 0x8f, 0xc0, + 0x38, 0x00, 0xf5, 0x48, 0x3a, 0xfd, 0xcd, 0x7e, + 0x21, 0xe7, 0xf8, 0xf6, 0xc2, 0xa7, 0x4c, 0x1c, + 0x6e, 0x83, 0x57, 0xf4, 0xa4, 0xb0, 0xc0, 0x5f, + 0x36, 0x73, 0x22, 0xff, 0x33, 0x44, 0xab, 0xeb, + 0x96, 0xa8, 0xe0, 0x37, 0x65, 0x81, 0x6b, 0x82, + 0x89, 0xcd, 0xcc, 0xac, 0x33, 0x18, 0x7d, 0x43, + 0x0e, 0x79, 0x53, 0x30, 0x21, 0x4c, 0x95, 0x18, + 0xb6, 0xc9, 0xea, 0x5c, 0x6f, 0xa1, 0x10, 0xa3, + 0x51, 0x0e, 0x67, 0x8c, 0x1c, 0x9d, 0xf1, 0x57, + 0xeb, 0xf6, 0xad, 0x4f, 0xf2, 0x55, 0xe8, 0x11, + 0x6f, 0xaa, 0x4d, 0xe5, 0x18, 0x3d, 0xc3, 0x14, + 0xf9, 0x40, 0xfa, 0x86, 0x9d, 0xaf, 0xff, 0xfc, + 0x78, 0xba, 0xbe, 0x61, 0xf8, 0xd1, 0x00, 0x8d +}; + +static const uint8_t plaintext_aes192ecb_192bytes[] = { + 0x19, 0x08, 0xa3, 0x58, 0x17, 0x14, 0x70, 0x5a, + 0xb8, 0xab, 0x4f, 0x5f, 0xa4, 0x25, 0x2b, 0xec, + 0xb6, 0x74, 0x0b, 0x9d, 0x56, 0x3b, 0xaf, 0xa3, + 0xa4, 0x2d, 0x3e, 0x1f, 0x18, 0x84, 0x3b, 0x4f, + 0x48, 0xd9, 0xa3, 0xfe, 0x59, 0x1e, 0x80, 0x67, + 0x44, 0x35, 0x26, 0x00, 0x78, 0xda, 0x68, 0xfa, + 0x61, 0x9c, 0xd8, 0x8e, 0x5c, 0xc1, 0xff, 0xeb, + 0x9c, 0x7d, 0xe7, 0xa9, 0x38, 0xeb, 0x66, 0xf8, + 0x6a, 0x46, 0x71, 0x51, 0x02, 0xba, 0x8d, 0x70, + 0x55, 0x5b, 0x60, 0xc6, 0x4c, 0xae, 0xda, 0x2e, + 0x17, 0xbb, 0x65, 0xef, 0x60, 0x85, 0x9e, 0x77, + 0xe5, 0x83, 0xef, 0x30, 0x08, 0x3a, 0xba, 0x80, + 0x28, 0xc0, 0xa1, 0x93, 0x4c, 0x2a, 0x0b, 0xe1, + 0xcb, 0xd0, 0xac, 0x72, 0x72, 0x1d, 0x96, 0x76, + 0x0e, 0xc0, 0xec, 0x7d, 0x84, 0xfd, 0xee, 0x08, + 0xa1, 0x11, 0x20, 0x0d, 0x59, 0x5c, 0x06, 0x3f, + 0xa3, 0xf1, 0xd7, 0xa3, 0x1d, 0x29, 0xc3, 0xaa, + 0x05, 0x2b, 0x74, 0x8c, 0x73, 0x60, 0x65, 0x43, + 0x76, 0xd4, 0xd7, 0x7b, 0x5f, 0x40, 0xf4, 0x77, + 0xe1, 0xcc, 0x85, 0x37, 0x1c, 0xd8, 0xda, 0x91, + 0xf0, 0x40, 0xb2, 0x43, 0x2d, 0x87, 0x51, 0xd0, + 0xce, 0x27, 0xa6, 0x60, 0xac, 0x67, 0xea, 0x8b, + 0xae, 0x46, 0x2e, 0x78, 0x06, 0x09, 0x8a, 0x82, + 0xb0, 0x0d, 0x57, 0x56, 0x82, 0xfe, 0x89, 0xd2 +}; + +static const uint8_t ciphertext_aes192ecb_192bytes[] = { + 0xcc, 0xe2, 0x3f, 0xc3, 0x12, 0x41, 0x31, 0x63, + 0x03, 0x3a, 0x3c, 0xfe, 0x76, 0x55, 0xd2, 0x26, + 0xf0, 0xc9, 0xb5, 0xc6, 0xf0, 0x1e, 0xc3, 0x72, + 0xfb, 0x64, 0x94, 0x7d, 0xf1, 0x5e, 0x2a, 0x9e, + 0x0d, 0x9a, 0x7a, 0xe0, 0xbc, 0x7b, 0xa6, 0x65, + 0x41, 0xc0, 0xa0, 0x9d, 0xb1, 0xb1, 0x09, 0x99, + 0x6e, 0xe7, 0x25, 0x5e, 0x64, 0x2b, 0x74, 0xfa, + 0xa1, 0x9a, 0x03, 0x33, 0x88, 0x81, 0x27, 0x48, + 0xdd, 0x53, 0x77, 0x0b, 0xef, 0xd9, 0x2f, 0xfa, + 0xc8, 0x50, 0x0e, 0x08, 0xa1, 0x45, 0x12, 0x82, + 0x2b, 0xfb, 0x85, 0x5a, 0x39, 0x8c, 0x71, 0x32, + 0x59, 0x27, 0x37, 0x53, 0xce, 0x3e, 0xae, 0x00, + 0x45, 0x53, 0xfd, 0xaf, 0xa5, 0xd1, 0x1a, 0xe9, + 0xa4, 0x1b, 0xe3, 0x99, 0xde, 0xcd, 0x03, 0x36, + 0x6b, 0x72, 0x43, 0x76, 0x04, 0xa8, 0xf9, 0x83, + 0xef, 0x9e, 0x57, 0x75, 0x36, 0x0e, 0x99, 0xe1, + 0x79, 0x2b, 0x2b, 0x96, 0x01, 0x10, 0xb8, 0xf6, + 0x4a, 0xa6, 0x13, 0xab, 0x7f, 0x55, 0x60, 0xf0, + 0xc9, 0x5c, 0x81, 0xa7, 0x96, 0x99, 0xb4, 0x55, + 0x41, 0x48, 0xf1, 0xd4, 0xa1, 0xb4, 0x76, 0xb5, + 0x35, 0xe1, 0x02, 0x8e, 0x09, 0xb2, 0x6c, 0x11, + 0x3f, 0xfb, 0x04, 0x47, 0x98, 0xab, 0x9b, 0x55, + 0xc3, 0xa9, 0x2a, 0x64, 0x32, 0x5a, 0x69, 0x96, + 0x28, 0x8c, 0x5b, 0xe3, 0xb2, 0x60, 0x82, 0xec +}; + +static const uint8_t plaintext_aes256ecb_256bytes[] = { + 0x0b, 0xe5, 0x48, 0xa6, 0xa1, 0xbc, 0xac, 0x81, + 0x80, 0x06, 0x5f, 0xae, 0x1e, 0x3f, 0x55, 0x73, + 0x6d, 0x36, 0x7f, 0x57, 0x3d, 0xa4, 0x4a, 0x6b, + 0xb6, 0x65, 0x2f, 0xb7, 0xe8, 0x85, 0x47, 0xe2, + 0x41, 0x42, 0xc2, 0x4e, 0x58, 0xf1, 0xde, 0x42, + 0x9f, 0x15, 0x4c, 0xaf, 0xea, 0x04, 0x20, 0xd0, + 0x1a, 0x19, 0x36, 0x74, 0x71, 0x12, 0x72, 0x1b, + 0xdb, 0x18, 0xf9, 0x0b, 0xb3, 0xf3, 0x63, 0xd4, + 0x62, 0x52, 0x8b, 0x63, 0x0f, 0x6b, 0x4d, 0xb9, + 0x70, 0xd6, 0x91, 0xa0, 0x43, 0x3f, 0x46, 0xfe, + 0x43, 0xbb, 0xb8, 0xdc, 0x5e, 0xdb, 0xd4, 0x1f, + 0xf0, 0x17, 0x94, 0x25, 0xee, 0x55, 0x67, 0xbf, + 0x4d, 0xda, 0x9d, 0xe7, 0x4b, 0xc6, 0x7a, 0xcf, + 0x8f, 0xd7, 0xbb, 0x29, 0x6e, 0x26, 0xd4, 0xc3, + 0x08, 0x9b, 0x67, 0x15, 0xe9, 0x2d, 0x9f, 0x2d, + 0x3c, 0x76, 0x26, 0xd3, 0xda, 0xfe, 0x6e, 0x73, + 0x9d, 0x09, 0x60, 0x4b, 0x35, 0x60, 0xdb, 0x77, + 0xb6, 0xc0, 0x45, 0x91, 0xf9, 0x14, 0x8a, 0x7a, + 0xdd, 0xe2, 0xf1, 0xdf, 0x8f, 0x12, 0x4f, 0xd7, + 0x75, 0xd6, 0x9a, 0x17, 0xda, 0x76, 0x88, 0xf0, + 0xfa, 0x44, 0x27, 0xbe, 0x61, 0xaf, 0x55, 0x9f, + 0xc7, 0xf0, 0x76, 0x77, 0xde, 0xca, 0xd1, 0x47, + 0x51, 0x55, 0xb1, 0xbf, 0xfa, 0x1e, 0xca, 0x28, + 0x17, 0x70, 0xf3, 0xb5, 0xd4, 0x32, 0x47, 0x04, + 0xe0, 0x92, 0xd8, 0xa5, 0x03, 0x69, 0x46, 0x99, + 0x7f, 0x1e, 0x3f, 0xb2, 0x93, 0x36, 0xa3, 0x88, + 0x75, 0x07, 0x68, 0xb8, 0x33, 0xce, 0x17, 0x3f, + 0x5c, 0xb7, 0x1e, 0x93, 0x38, 0xc5, 0x1d, 0x79, + 0x86, 0x7c, 0x9d, 0x9e, 0x2f, 0x69, 0x38, 0x0f, + 0x97, 0x5c, 0x67, 0xbf, 0xa0, 0x8d, 0x37, 0x0b, + 0xd3, 0xb1, 0x04, 0x87, 0x1d, 0x74, 0xfe, 0x30, + 0xfb, 0xd0, 0x22, 0x92, 0xf9, 0xf3, 0x23, 0xc9 +}; + +static const uint8_t ciphertext_aes256ecb_256bytes[] = { + 0x4b, 0xc0, 0x1f, 0x80, 0xf5, 0xc7, 0xe8, 0xf5, + 0xc9, 0xd0, 0x3c, 0x86, 0x50, 0x78, 0x21, 0xce, + 0x01, 0xec, 0x91, 0x00, 0xc9, 0xf8, 0x73, 0x43, + 0x2f, 0x73, 0x8a, 0x6d, 0xee, 0xed, 0x2d, 0x40, + 0x17, 0x16, 0x93, 0x15, 0xac, 0xed, 0x28, 0x61, + 0xb0, 0x0f, 0xa2, 0xe1, 0xd3, 0x80, 0x51, 0xdf, + 0x73, 0xce, 0x48, 0x4c, 0x1c, 0xc1, 0x8b, 0xc9, + 0x9e, 0x5c, 0x48, 0x07, 0xa0, 0xf6, 0x29, 0xf8, + 0x63, 0x87, 0xe4, 0xe7, 0x8b, 0xf8, 0xcf, 0x58, + 0xda, 0x57, 0x62, 0x11, 0x2e, 0x6e, 0x91, 0x7e, + 0xc7, 0x73, 0xdb, 0x27, 0x3c, 0x64, 0x72, 0x52, + 0xe3, 0x27, 0x84, 0x1f, 0x73, 0x3f, 0xf4, 0x94, + 0xd2, 0xdd, 0x93, 0x33, 0x65, 0x91, 0x98, 0x89, + 0x13, 0xa9, 0x2b, 0x0d, 0x6f, 0x56, 0x51, 0x15, + 0x07, 0xc6, 0xa7, 0x36, 0x8f, 0x0c, 0xd6, 0xc2, + 0x07, 0x06, 0x65, 0x7a, 0xf8, 0x94, 0xa6, 0x75, + 0x48, 0x4c, 0xcc, 0xa5, 0xa9, 0x91, 0x04, 0x2f, + 0x7b, 0x89, 0x46, 0xd2, 0x87, 0xcb, 0xd6, 0x1b, + 0xf3, 0x1e, 0xa7, 0xe5, 0x09, 0xcf, 0x75, 0x05, + 0x9f, 0xc9, 0xac, 0xcc, 0x61, 0x15, 0x2d, 0x2e, + 0x2c, 0x0a, 0x57, 0x4d, 0x33, 0x17, 0x6b, 0x22, + 0x9e, 0x92, 0xc5, 0x81, 0xce, 0x9d, 0x52, 0x68, + 0x7d, 0x98, 0xe1, 0x23, 0x70, 0xc5, 0x19, 0x3e, + 0x91, 0xfc, 0xc6, 0xd7, 0x67, 0x5f, 0xbb, 0x57, + 0x20, 0x96, 0x3f, 0x1f, 0x9f, 0x64, 0xe9, 0xb1, + 0x51, 0xfd, 0x8c, 0xc1, 0x0f, 0x50, 0xbe, 0x43, + 0x5f, 0x90, 0xb4, 0xd1, 0xb6, 0x41, 0x7c, 0x37, + 0x92, 0x71, 0xda, 0x9d, 0xfd, 0xee, 0x69, 0x8c, + 0x24, 0x18, 0xe8, 0x81, 0x60, 0xe2, 0x89, 0x33, + 0x42, 0xd4, 0x1b, 0x6a, 0xcb, 0x4a, 0x5b, 0x00, + 0x01, 0x4f, 0x11, 0x47, 0x0f, 0x57, 0xb0, 0x90, + 0xf0, 0xed, 0xb0, 0x34, 0x2e, 0x9f, 0x81, 0x6c +}; + +static const uint8_t plaintext_aes128ecb_1008bytes[] = { + 0xdd, 0x14, 0xde, 0x30, 0xe0, 0xfd, 0x7b, 0x2a, + 0x94, 0x8e, 0x28, 0xa0, 0xf6, 0x93, 0x6e, 0xf5, + 0x92, 0x65, 0x1d, 0x5e, 0x78, 0x2a, 0x9d, 0x39, + 0xfc, 0xb8, 0x6d, 0x8b, 0xa5, 0xf4, 0x4b, 0x21, + 0xdd, 0x4e, 0xe9, 0xeb, 0xd7, 0xa7, 0xa1, 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d6, 0x3a, + 0x73, 0x08, 0xf0, 0x47, 0x5f, 0xcf, 0x15, 0xf7, + 0x7b, 0xf3, 0x69, 0x08, 0x5a, 0x6b, 0x9f, 0xc7, + 0x12, 0xa1, 0xf0, 0xfb, 0x91, 0xc9, 0x07, 0x61, + 0x21, 0xa0, 0x30, 0x4c, 0x16, 0x81, 0xcd, 0x3c, + 0x61, 0xe8, 0x96, 0x91, 0x30, 0xdd, 0x0c, 0x0e, + 0x0b, 0xa1, 0x33, 0x95, 0x67, 0x99, 0xd6, 0x1e, + 0x1a, 0xb3, 0x12, 0xfd, 0xad, 0x46, 0x48, 0x87, + 0x5e, 0xe8, 0xd4, 0xf5, 0xac, 0xdf, 0xa7, 0x37, + 0xb8, 0xa1, 0x62, 0x8c, 0xb8, 0xb6, 0xb0, 0x69, + 0x63, 0x29, 0x60, 0x64, 0x26, 0xc3, 0xf8, 0x18, + 0x8e, 0x46, 0xa0, 0xc5, 0x45, 0x5c, 0x08, 0x2a, + 0xed, 0x29, 0x84, 0x11, 0xea, 0x59, 0xc0, 0x16, + 0xe2, 0x04, 0x30, 0x63, 0x22, 0x87, 0xb6, 0xc7, + 0x81, 0xa6, 0x58, 0xc0, 0xb2, 0xb0, 0x7d, 0xbc, + 0x16, 0x44, 0x6e, 0x5d, 0x6d, 0xce, 0x2a, 0xe0, + 0x20, 0x69, 0x35, 0xa1, 0x5d, 0x17, 0x48, 0x55, + 0x88, 0xfe, 0xde, 0x34, 0xe7, 0x18, 0xbf, 0x7e, + 0x0a, 0x1c, 0x32, 0x88, 0xab, 0xde, 0xe1, 0x02, + 0x61, 0x09, 0x58, 0x96, 0xef, 0x16, 0x73, 0xac, + 0xc0, 0x5c, 0x15, 0xca, 0x9b, 0xea, 0x0e, 0x05, + 0x97, 0x88, 0x09, 0xc5, 0xd0, 0x95, 0x90, 0xae, + 0xa5, 0xb5, 0x28, 0xc6, 0x5a, 0x7b, 0xb3, 0xcc, + 0xae, 0x57, 0x71, 0x83, 0x56, 0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0xcf, 0x4c, 0x9a, 0x74, + 0xbb, 0x00, 0x36, 0x41, 0xd1, 0x13, 0x68, 0x73, + 0x78, 0x63, 0x42, 0xdd, 0x99, 0x15, 0x9a, 0xf4, + 0xe1, 0xad, 0x6d, 0xf6, 0x5e, 0xca, 0x20, 0x24, + 0xd7, 0x9d, 0x2f, 0x58, 0x97, 0xf7, 0xde, 0x31, + 0x51, 0xa3, 0x1c, 0xe2, 0x66, 0x24, 0x4b, 0xa1, + 0x56, 0x02, 0x32, 0xf4, 0x89, 0xf3, 0x86, 0x9a, + 0x85, 0xda, 0x95, 0xa8, 0x7f, 0x6a, 0x77, 0x02, + 0x3a, 0xba, 0xe0, 0xbe, 0x34, 0x5c, 0x9a, 0x1a +}; + +static const uint8_t ciphertext_aes128ecb_1008bytes[] = { + 0x62, 0xa1, 0xcc, 0x1e, 0x1b, 0xc3, 0xb1, 0x11, + 0xb5, 0x11, 0x4c, 0x37, 0xbf, 0xd0, 0x0c, 0xef, + 0x36, 0x9f, 0x99, 0x49, 0x38, 0xc2, 0x62, 0xbd, + 0x3e, 0x03, 0xd1, 0x02, 0xa2, 0x18, 0xdc, 0x58, + 0x9c, 0x01, 0x99, 0xd8, 0x47, 0xeb, 0x27, 0xce, + 0x76, 0x84, 0xa5, 0xab, 0xb7, 0x9b, 0xbb, 0x98, + 0xc9, 0x84, 0x02, 0x6e, 0x32, 0x65, 0xc9, 0xcb, + 0xca, 0xc7, 0xa5, 0x95, 0x11, 0xcc, 0x0a, 0x9d, + 0x5e, 0xea, 0xba, 0x59, 0xef, 0x25, 0xc0, 0x2d, + 0x8b, 0xa2, 0xec, 0x2f, 0x34, 0xea, 0x7c, 0xef, + 0xee, 0x2a, 0x57, 0x80, 0xc4, 0xca, 0x5e, 0x08, + 0x8c, 0x12, 0x13, 0x39, 0xd1, 0xc7, 0x96, 0x93, + 0x41, 0x22, 0x97, 0x1c, 0x7d, 0xe0, 0x47, 0xab, + 0xfa, 0xd7, 0xc6, 0x38, 0x5a, 0x39, 0xdb, 0x4c, + 0xd4, 0x6d, 0x50, 0x2b, 0x8f, 0xb1, 0x92, 0x06, + 0x01, 0xbf, 0xdc, 0x14, 0x5c, 0x32, 0xee, 0xb0, + 0x6a, 0x36, 0xe8, 0xe9, 0xf3, 0x12, 0x9f, 0x1f, + 0x00, 0xe5, 0x25, 0x3b, 0x52, 0x74, 0xba, 0x50, + 0x17, 0x81, 0x60, 0x5c, 0x15, 0xec, 0x4d, 0xb0, + 0x6a, 0xa1, 0xdd, 0xb4, 0xa2, 0x71, 0x01, 0xb8, + 0x8b, 0x59, 0x93, 0x58, 0x23, 0xd6, 0x38, 0xbf, + 0x49, 0x94, 0xb7, 0x6e, 0x22, 0x75, 0x68, 0x1f, + 0x15, 0x2c, 0xc4, 0x46, 0x44, 0x35, 0xc8, 0x7a, + 0x40, 0x2e, 0x55, 0x3f, 0x67, 0x4d, 0x12, 0x21, + 0xf6, 0xb1, 0x20, 0x47, 0x4f, 0x35, 0xe4, 0x96, + 0xf9, 0xa2, 0xdc, 0x4c, 0xe3, 0xa2, 0x13, 0x41, + 0xed, 0x6d, 0x86, 0x80, 0x23, 0xe5, 0x2a, 0xd1, + 0xa0, 0x69, 0x8f, 0x7e, 0x22, 0x3f, 0xf1, 0x65, + 0x9f, 0xd7, 0x86, 0xa8, 0x78, 0x57, 0x49, 0x74, + 0x91, 0x52, 0x91, 0xe7, 0x1e, 0xe2, 0x14, 0xe9, + 0x88, 0xe1, 0x67, 0x12, 0x3d, 0x0a, 0x22, 0x31, + 0x56, 0x2e, 0x36, 0xd4, 0x45, 0xc9, 0x9b, 0x7b, + 0x09, 0x53, 0x55, 0x36, 0xed, 0xa3, 0xc2, 0x22, + 0xac, 0x00, 0x5e, 0x57, 0xc8, 0x40, 0x65, 0xd2, + 0x62, 0x61, 0x35, 0xf2, 0xe8, 0x4f, 0xb3, 0x9d, + 0x2c, 0xb2, 0x12, 0x5e, 0x15, 0x47, 0xd6, 0x1c, + 0x99, 0x80, 0xe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, 0xc3, + 0x2e, 0x9c, 0x1a, 0x42, 0x75, 0xe1, 0x59, 0xc9, + 0x05, 0x12, 0x6c, 0xea, 0x2b, 0x2f, 0x89, 0xfc, + 0xa4, 0x73, 0xc8, 0xdc, 0xf6, 0xd5, 0x50, 0x19, + 0x22, 0x80, 0xbc, 0x08, 0x48, 0xb4, 0x45, 0x47, + 0x25, 0x01, 0xa9, 0x55, 0x7b, 0x66, 0xbd, 0x84, + 0x0f, 0x16, 0xfa, 0x44, 0x23, 0x51, 0x6f, 0xed, + 0x35, 0x0e, 0x88, 0x4d, 0xda, 0xe8, 0x27, 0x94, + 0xbd, 0x68, 0x46, 0x28, 0x79, 0x8c, 0x03, 0x03, + 0xf0, 0x81, 0xac, 0xbc, 0xc2, 0xdd, 0xa8, 0x98, + 0xdf, 0xe3, 0x1c, 0x1c, 0x4b, 0x43, 0x9e, 0x7b, + 0x26, 0x3c, 0xe9, 0xff, 0x3b, 0xee, 0x35, 0xe6, + 0x2a, 0xcf, 0xdc, 0x17, 0x85, 0x99, 0x9e, 0x88, + 0x5c, 0x38, 0x4c, 0x56, 0x4a, 0x06, 0xeb, 0x28, + 0xf7, 0xb5, 0x97, 0x04, 0xd4, 0x05, 0x85, 0xee, + 0x90, 0xd7, 0xe2, 0x10, 0x8a, 0x86, 0xb2, 0x3f, + 0xbf, 0x3f, 0x6a, 0xe6, 0xeb, 0xc1, 0x42, 0x97, + 0xcb, 0x30, 0x41, 0x44, 0x79, 0x44, 0x7e, 0x1e, + 0x3e, 0x55, 0xe5, 0xc8, 0xd5, 0xec, 0x64, 0x3d, + 0x09, 0x69, 0xea, 0xdb, 0xe5, 0x08, 0x33, 0x00, + 0x79, 0x1b, 0x31, 0xf2, 0x3d, 0xbd, 0x73, 0xe6, + 0x0e, 0xc1, 0xb9, 0x45, 0xbf, 0xa5, 0x52, 0x5a, + 0xcd, 0x71, 0x7a, 0x2e, 0x20, 0x1e, 0xbf, 0xff, + 0x42, 0x0a, 0x6a, 0x1b,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xa4, + 0x8e, 0x12, 0xfa, 0x03, 0x8e, 0x69, 0x4c, 0x7e, + 0xc5, 0x10, 0xd5, 0x00, 0x64, 0x87, 0xf8, 0x10, + 0x8a, 0x8e, 0x96, 0x9e, 0xc8, 0xac, 0x42, 0x75, + 0x97, 0x6d, 0x62, 0x3f, 0xa3, 0x29, 0x11, 0xd2, + 0x73, 0xd3, 0x95, 0xef, 0xb4, 0x64, 0xa4, 0x37, + 0x09, 0x15, 0x42, 0x7f, 0xc4, 0x46, 0x8b, 0x80, + 0xa8, 0xd9, 0x2a, 0xfc, 0x38, 0x8f, 0xf9, 0xc1, + 0xc5, 0x95, 0xad, 0x62, 0xc9, 0x6c, 0x60, 0x0b, + 0x30, 0x04, 0x8c, 0x88, 0xb5, 0x0b, 0x73, 0x23, + 0xa4, 0xe0, 0xb7, 0x6e, 0x4c, 0x78, 0xe5, 0x0a, + 0xfb, 0xe1, 0xc4, 0xeb, 0x1a, 0xb4, 0xd8, 0x3c, + 0x06, 0xb0, 0x00, 0x23, 0x86, 0xb0, 0xb4, 0x9d, + 0x33, 0xe4, 0x21, 0xca, 0xf2, 0xad, 0x14, 0x07, + 0x82, 0x25, 0xde, 0x85, 0xe4, 0x58, 0x56, 0x93, + 0x09, 0x3a, 0xeb, 0xde, 0x46, 0x77, 0x76, 0xa2, + 0x35, 0x39, 0xd0, 0xf6, 0x10, 0x81, 0x73, 0x3f, + 0x22, 0x3b, 0xeb, 0xca, 0x00, 0x19, 0x38, 0x89, + 0x26, 0x29, 0x7d, 0x6f, 0x70, 0xa6, 0xbb, 0x52, + 0x58, 0xb1, 0x0a, 0x85, 0xe9, 0x0b, 0x74, 0x2f, + 0x08, 0xe8, 0xa4, 0x4d, 0xa1, 0xcf, 0xf2, 0x75, + 0xed, 0x05, 0xae, 0x7f, 0x10, 0xb1, 0x71, 0x26, + 0xc5, 0xc7, 0xdc, 0xb0, 0x2d, 0x26, 0xf1, 0xb4 +}; + +/** AES-128-ECB test vector */ +static const struct blockcipher_test_data aes_test_data_15 = { + .crypto_algo = RTE_CRYPTO_CIPHER_AES_ECB, + .cipher_key = { + .data = { + 0x2b, 0x7e, 0x15, 0x16, 0x28, 0xae, 0xd2, 0xa6, + 0xab, 0xf7, 0x15, 0x88, 0x09, 0xcf, 0x4f, 0x3c + }, + .len = 16 + }, + .iv = { + .data = { 0 }, + .len = 0 + }, + .plaintext = { + .data = plaintext_aes128ecb, + .len = 64 + }, + .ciphertext = { + .data = ciphertext_aes128ecb, + .len = 64 + } +}; + +/** AES-192-ECB test vector */ +static const struct blockcipher_test_data aes_test_data_16 = { + .crypto_algo = RTE_CRYPTO_CIPHER_AES_ECB, + .cipher_key = { + .data = { + 0x8e, 0x73, 0xb0, 0xf7, 0xda, 0x0e, 0x64, 0x52, + 0xc8, 0x10, 0xf3, 0x2b, 0x80, 0x90, 0x79, 0xe5, + 0x62, 0xf8, 0xea, 0xd2, 0x52, 0x2c, 0x6b, 0x7b + }, + .len = 24 + }, + .iv = { + .data = { 0 }, + .len = 0 + }, + .plaintext = { + .data = plaintext_aes192ecb, + .len = 64 + }, + .ciphertext = { + .data = ciphertext_aes192ecb, + .len = 64 + } +}; + +/** AES-256-ECB test vector */ +static const struct blockcipher_test_data aes_test_data_17 = { + .crypto_algo = RTE_CRYPTO_CIPHER_AES_ECB, + .cipher_key = { + .data = { + 0x60, 0x3d, 0xeb, 0x10, 0x15, 0xca, 0x71, 0xbe, + 0x2b, 0x73, 0xae, 0xf0, 0x85, 0x7d, 0x77, 0x81, + 0x1f, 0x35, 0x2c, 0x07, 0x3b, 0x61, 0x08, 0xd7, + 0x2d, 0x98, 0x10, 0xa3, 0x09, 0x14, 0xdf, 0xf4 + }, + .len = 32 + }, + .iv = { + .data = { 0 }, + .len = 0 + }, + .plaintext = { + .data = plaintext_aes256ecb, + .len = 64 + }, + .ciphertext = { + .data = ciphertext_aes256ecb, + .len = 64 + } +}; + +/** AES-128-ECB 128 byte test vector */ +static const struct blockcipher_test_data aes_test_data_18 = { + .crypto_algo = RTE_CRYPTO_CIPHER_AES_ECB, + .cipher_key = { + .data = { + 0x2b, 0x7e, 0x15, 0x16, 0x28, 0xae, 0xd2, 0xa6, + 0xab, 0xf7, 0x15, 0x88, 0x09, 0xcf, 0x4f, 0x3c + }, + .len = 16 + }, + .iv = { + .data = { 0 }, + .len = 0 + }, + .plaintext = { + .data = plaintext_aes128ecb_128bytes, + .len = 128 + }, + .ciphertext = { + .data = ciphertext_aes128ecb_128bytes, + .len = 128 + } +}; + +/** AES-192-ECB 192 bytes test vector */ +static const struct blockcipher_test_data aes_test_data_19 = { + .crypto_algo = RTE_CRYPTO_CIPHER_AES_ECB, + .cipher_key = { + .data = { + 0x8e, 0x73, 0xb0, 0xf7, 0xda, 0x0e, 0x64, 0x52, + 0xc8, 0x10, 0xf3, 0x2b, 0x80, 0x90, 0x79, 0xe5, + 0x62, 0xf8, 0xea, 0xd2, 0x52, 0x2c, 0x6b, 0x7b + }, + .len = 24 + }, + .iv = { + .data = { 0 }, + .len = 0 + }, + .plaintext = { + .data = plaintext_aes192ecb_192bytes, + .len = 64 + }, + .ciphertext = { + .data = ciphertext_aes192ecb_192bytes, + .len = 64 + } +}; + +/** AES-256-ECB 256 byte test vector */ +static const struct blockcipher_test_data aes_test_data_20 = { + .crypto_algo = RTE_CRYPTO_CIPHER_AES_ECB, + .cipher_key = { + .data = { + 0x60, 0x3d, 0xeb, 0x10, 0x15, 0xca, 0x71, 0xbe, + 0x2b, 0x73, 0xae, 0xf0, 0x85, 0x7d, 0x77, 0x81, + 0x1f, 0x35, 0x2c, 0x07, 0x3b, 0x61, 0x08, 0xd7, + 0x2d, 0x98, 0x10, 0xa3, 0x09, 0x14, 0xdf, 0xf4 + }, + .len = 32 + }, + .iv = { + .data = { 0 }, + .len = 0 + }, + .plaintext = { + .data = plaintext_aes256ecb_256bytes, + .len = 256 + }, + .ciphertext = { + .data = ciphertext_aes256ecb_256bytes, + .len = 256 + } +}; + +/** AES-128-ECB 1008 byte test vector */ +static const struct blockcipher_test_data aes_test_data_21 = { + .crypto_algo = RTE_CRYPTO_CIPHER_AES_ECB, + .cipher_key = { + .data = { + 0x2b, 0x7e, 0x15, 0x16, 0x28, 0xae, 0xd2, 0xa6, + 0xab, 0xf7, 0x15, 0x88, 0x09, 0xcf, 0x4f, 0x3c + }, + .len = 16 + }, + .iv = { + .data = { 0 }, + .len = 0 + }, + .plaintext = { + .data = plaintext_aes128ecb_1008bytes, + .len = 1008 + }, + .ciphertext = { + .data = ciphertext_aes128ecb_1008bytes, + .len = 1008 + } +}; + /* NULL cipher NULL auth 8-byte multiple test vector */ static const struct blockcipher_test_data null_test_data_chain_x8_multiple = { .crypto_algo = RTE_CRYPTO_CIPHER_NULL, @@ -2156,6 +2816,76 @@ static const struct blockcipher_test_case aes_cipheronly_test_cases[] = { .test_data = &null_test_data_chain_x1_multiple, .op_mask = BLOCKCIPHER_TEST_OP_DECRYPT, }, + { + .test_descr = "AES-128-ECB Encryption", + .test_data = &aes_test_data_15, + .op_mask = BLOCKCIPHER_TEST_OP_ENCRYPT, + }, + { + .test_descr = "AES-128-ECB Decryption", + .test_data = &aes_test_data_15, + .op_mask = BLOCKCIPHER_TEST_OP_DECRYPT, + }, + { + .test_descr = "AES-192-ECB Encryption", + .test_data = &aes_test_data_16, + .op_mask = BLOCKCIPHER_TEST_OP_ENCRYPT, + }, + { + .test_descr = "AES-192-ECB Decryption", + .test_data = &aes_test_data_16, + .op_mask = BLOCKCIPHER_TEST_OP_DECRYPT, + }, + { + .test_descr = "AES-256-ECB Encryption", + .test_data = &aes_test_data_17, + .op_mask = BLOCKCIPHER_TEST_OP_ENCRYPT, + }, + { + .test_descr = "AES-256-ECB Decryption", + .test_data = &aes_test_data_17, + .op_mask = BLOCKCIPHER_TEST_OP_DECRYPT, + }, + { + .test_descr = "AES-128-ECB Encryption (128-byte plaintext)", + .test_data = &aes_test_data_18, + .op_mask = BLOCKCIPHER_TEST_OP_ENCRYPT, + }, + { + .test_descr = "AES-128-ECB Decryption (128-byte plaintext)", + .test_data = &aes_test_data_18, + .op_mask = BLOCKCIPHER_TEST_OP_DECRYPT, + }, + { + .test_descr = "AES-192-ECB Encryption (192-byte plaintext)", + .test_data = &aes_test_data_19, + .op_mask = BLOCKCIPHER_TEST_OP_ENCRYPT, + }, + { + .test_descr = "AES-192-ECB Decryption (192-byte plaintext)", + .test_data = &aes_test_data_19, + .op_mask = BLOCKCIPHER_TEST_OP_DECRYPT, + }, + { + .test_descr = "AES-256-ECB Encryption (256-byte plaintext)", + .test_data = &aes_test_data_20, + .op_mask = BLOCKCIPHER_TEST_OP_ENCRYPT, + }, + { + .test_descr = "AES-256-ECB Decryption (192-byte plaintext)", + .test_data = &aes_test_data_20, + .op_mask = BLOCKCIPHER_TEST_OP_DECRYPT, + }, + { + .test_descr = "AES-128-ECB Encryption (1008-byte plaintext)", + .test_data = &aes_test_data_21, + .op_mask = BLOCKCIPHER_TEST_OP_ENCRYPT, + }, + { + .test_descr = "AES-128-ECB Decryption (1008-byte plaintext)", + .test_data = &aes_test_data_21, + .op_mask = BLOCKCIPHER_TEST_OP_DECRYPT, + }, }; static const struct blockcipher_test_case aes_docsis_test_cases[] = { diff --git a/doc/guides/cryptodevs/aesni_mb.rst b/doc/guides/cryptodevs/aesni_mb.rst index 15388d20a..69d69ff31 100644 --- a/doc/guides/cryptodevs/aesni_mb.rst +++ b/doc/guides/cryptodevs/aesni_mb.rst @@ -32,6 +32,9 @@ Cipher algorithms: * RTE_CRYPTO_CIPHER_DES_CBC * RTE_CRYPTO_CIPHER_3DES_CBC * RTE_CRYPTO_CIPHER_DES_DOCSISBPI +* RTE_CRYPTO_CIPHER_AES128_ECB +* RTE_CRYPTO_CIPHER_AES192_ECB +* RTE_CRYPTO_CIPHER_AES256_ECB Hash algorithms: diff --git a/doc/guides/cryptodevs/features/aesni_mb.ini b/doc/guides/cryptodevs/features/aesni_mb.ini index 38d255aff..126b3a496 100644 --- a/doc/guides/cryptodevs/features/aesni_mb.ini +++ b/doc/guides/cryptodevs/features/aesni_mb.ini @@ -30,6 +30,9 @@ AES DOCSIS BPI = Y DES CBC = Y 3DES CBC = Y DES DOCSIS BPI = Y +AES ECB (128) = Y +AES ECB (192) = Y +AES ECB (256) = Y ; ; Supported authentication algorithms of the 'aesni_mb' crypto driver. diff --git a/doc/guides/rel_notes/release_20_11.rst b/doc/guides/rel_notes/release_20_11.rst index df227a177..a88ad110f 100644 --- a/doc/guides/rel_notes/release_20_11.rst +++ b/doc/guides/rel_notes/release_20_11.rst @@ -55,6 +55,10 @@ New Features Also, make sure to start the actual text at the margin. ======================================================= +* **Added support for AES-ECB in aesni_mb PMD.** + + * Added support for AES-ECB 128, 192 and 256 in aesni_mb PMD. + Removed Items ------------- diff --git a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c index 1bddbcf74..e49428358 100644 --- a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c +++ b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c @@ -429,6 +429,12 @@ aesni_mb_set_session_cipher_parameters(const MB_MGR *mb_mgr, sess->cipher.mode = DES3; is_3DES = 1; break; +#if IMB_VERSION(0, 53, 0) <= IMB_VERSION_NUM + case RTE_CRYPTO_CIPHER_AES_ECB: + sess->cipher.mode = ECB; + is_aes = 1; + break; +#endif default: AESNI_MB_LOG(ERR, "Unsupported cipher mode parameter"); return -ENOTSUP; diff --git a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd_ops.c b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd_ops.c index 2362f0c3c..ccec4ebd0 100644 --- a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd_ops.c +++ b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd_ops.c @@ -497,6 +497,24 @@ static const struct rte_cryptodev_capabilities aesni_mb_pmd_capabilities[] = { }, } }, } }, +#if IMB_VERSION(0, 53, 0) <= IMB_VERSION_NUM + { /* AES ECB */ + .op = RTE_CRYPTO_OP_TYPE_SYMMETRIC, + {.sym = { + .xform_type = RTE_CRYPTO_SYM_XFORM_CIPHER, + {.cipher = { + .algo = RTE_CRYPTO_CIPHER_AES_ECB, + .block_size = 16, + .key_size = { + .min = 16, + .max = 32, + .increment = 8 + }, + .iv_size = { 0 } + }, } + }, } + }, +#endif RTE_CRYPTODEV_END_OF_CAPABILITIES_LIST() };