From patchwork Wed Jan 18 15:04:50 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fiona Trahe X-Patchwork-Id: 19732 X-Patchwork-Delegate: pablo.de.lara.guarch@intel.com Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [IPv6:::1]) by dpdk.org (Postfix) with ESMTP id 3793EFA76; Wed, 18 Jan 2017 16:05:07 +0100 (CET) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id A7F2EFA73 for ; Wed, 18 Jan 2017 16:05:05 +0100 (CET) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga102.jf.intel.com with ESMTP; 18 Jan 2017 07:05:04 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.33,249,1477983600"; d="scan'208";a="32196305" Received: from sivswdev01.ir.intel.com (HELO localhost.localdomain) ([10.237.217.45]) by orsmga002.jf.intel.com with ESMTP; 18 Jan 2017 07:04:58 -0800 From: Fiona Trahe To: dev@dpdk.org Cc: deepak.k.jain@intel.com, pablo.de.lara.guarch@intel.com, fiona.trahe@intel.com Date: Wed, 18 Jan 2017 15:04:50 +0000 Message-Id: <1484751890-9716-1-git-send-email-fiona.trahe@intel.com> X-Mailer: git-send-email 1.7.0.7 Subject: [dpdk-dev] [PATCH] cryptodev: enable BPI for Cablelabs DOCSIS security spec 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" Extend the DPDK cryptodev API to enable processing of packets according to the Baseline Privacy Interface Plus (BPI+) Specification described in the security specification of the Cablelabs Data-over-Cable Service Interface Specification (DOCSIS). Brief summary of BPI+ symmetric cryptography requirements: BPI+ cryptography uses a block cipher (AES-CBC/DES-CBC) to encrypt/decrypt all the whole blocks in the packet. However the data length is not always a block-multiple, so where there is a final block less than the full block size this residual block requires special handling using AES-CFB/DES-CFB mode. Similar special handling is specified where there is only one block, smaller than the block size for the cipher. See spec for further details. https://apps.cablelabs.com/specification/docsis-3-1-security-specification/ Two new elements are added to the enum rte_crypto_cipher_algorithm. Note elements of this enum are actually a combination of an algorithm (AES, 3DES, etc) and mode (CBC, CTR, etc). The new DOCSISBPI mode is used to convey to the PMD that the mode applied should be the specific combination of CBC and CFB required by the DOCSIS Baseline Privacy Plus Spec. Signed-off-by: Fiona Trahe --- This patch is targeted at dpdk 17.05 release - pushing API early to give people a chance to comment. PMD patches implementing this are expected later in the 17.05 release cycle. lib/librte_cryptodev/rte_crypto_sym.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/lib/librte_cryptodev/rte_crypto_sym.h b/lib/librte_cryptodev/rte_crypto_sym.h index 0e20b30..c25c09c 100644 --- a/lib/librte_cryptodev/rte_crypto_sym.h +++ b/lib/librte_cryptodev/rte_crypto_sym.h @@ -108,7 +108,17 @@ enum rte_crypto_cipher_algorithm { RTE_CRYPTO_CIPHER_DES_CBC, /**< DES algorithm in CBC mode */ - RTE_CRYPTO_CIPHER_LIST_END + RTE_CRYPTO_CIPHER_DES_DOCSISBPI, + /**< DES algorithm using modes required by + * DOCSIS Baseline Privacy Plus Spec. + */ + + RTE_CRYPTO_CIPHER_AES_DOCSISBPI, + /**< AES algorithm using modes required by + * DOCSIS Baseline Privacy Plus Spec. + */ + + RTE_CRYPTO_CIPHER_LIST_END };