From patchwork Tue Sep 20 12:35:46 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arkadiusz Kusztal X-Patchwork-Id: 15961 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 204B06CD0; Tue, 20 Sep 2016 14:36:02 +0200 (CEST) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id 451356CC5 for ; Tue, 20 Sep 2016 14:35:59 +0200 (CEST) Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga103.fm.intel.com with ESMTP; 20 Sep 2016 05:35:59 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.30,368,1470726000"; d="scan'208";a="11211246" Received: from sivswdev03.ir.intel.com (HELO localhost.localdomain) ([10.237.217.157]) by fmsmga006.fm.intel.com with ESMTP; 20 Sep 2016 05:35:57 -0700 From: Arek Kusztal To: dev@dpdk.org Cc: fiona.trahe@intel.com, deepak.k.jain@intel.com, pablo.de.lara.guarch@intel.com, john.griffin@intel.com, Arek Kusztal Date: Tue, 20 Sep 2016 13:35:46 +0100 Message-Id: <1474374946-26631-4-git-send-email-arkadiuszx.kusztal@intel.com> X-Mailer: git-send-email 1.7.0.7 In-Reply-To: <1474374946-26631-1-git-send-email-arkadiuszx.kusztal@intel.com> References: <1474374946-26631-1-git-send-email-arkadiuszx.kusztal@intel.com> Subject: [dpdk-dev] [PATCH v2 3/3] lib/librte_cryptodev: change GMAC API comments X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" File rte_crypto_sym.h GMAC API comments need to be changed to comply to the GMAC specification. Main areas of changes is aad pointer and aad len which now will be used to provide plaintext. Signed-off-by: Arek Kusztal Acked-by: Deepak Kumar Jain --- lib/librte_cryptodev/rte_crypto_sym.h | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/lib/librte_cryptodev/rte_crypto_sym.h b/lib/librte_cryptodev/rte_crypto_sym.h index 8178e5a..5b18865 100644 --- a/lib/librte_cryptodev/rte_crypto_sym.h +++ b/lib/librte_cryptodev/rte_crypto_sym.h @@ -84,11 +84,11 @@ enum rte_crypto_cipher_algorithm { /**< AES algorithm in F8 mode */ RTE_CRYPTO_CIPHER_AES_GCM, /**< AES algorithm in GCM mode. When this cipher algorithm is used the - * *RTE_CRYPTO_AUTH_AES_GCM* element of the - * *rte_crypto_auth_algorithm* enum MUST be used to set up the related - * *rte_crypto_auth_setup_data* structure in the session context or in - * the op_params of the crypto operation structure in the case of a - * session-less crypto operation. + * *RTE_CRYPTO_AUTH_AES_GCM* or *RTE_CRYPTO_AUTH_AES_GMAC* element + * of the *rte_crypto_auth_algorithm* enum MUST be used to set up + * the related *rte_crypto_auth_setup_data* structure in the session + * context or in the op_params of the crypto operation structure + * in the case of a session-less crypto operation. */ RTE_CRYPTO_CIPHER_AES_XTS, /**< AES algorithm in XTS mode */ @@ -308,8 +308,8 @@ struct rte_crypto_auth_xform { * @note * For AES-GMAC (@ref RTE_CRYPTO_AUTH_AES_GMAC) mode of operation * this field is not used and should be set to 0. Instead the length - * of the AAD data is specified in the message length to hash field of - * the rte_crypto_sym_op_data structure. + * of the AAD data is specified in additional authentication data + * length field of the rte_crypto_sym_op_data structure */ }; @@ -485,8 +485,9 @@ struct rte_crypto_sym_op { * should be set instead. * * @note For AES-GMAC (@ref RTE_CRYPTO_AUTH_AES_GMAC) - * mode of operation, this field specifies the start - * of the AAD data in the source buffer. + * mode of operation, this field is set to 0. aad data + * pointer of rte_crypto_sym_op_data structure is + * used instead * * @note * For Snow3G @ RTE_CRYPTO_AUTH_SNOW3G_UIA2 @@ -505,8 +506,8 @@ struct rte_crypto_sym_op { * * @note * For AES-GMAC @ref RTE_CRYPTO_AUTH_AES_GMAC mode - * of operation, this field specifies the length of - * the AAD data in the source buffer. + * of operation, this field is set to 0. + * Auth.aad.length is used instead. * * @note * For Snow3G @ RTE_CRYPTO_AUTH_SNOW3G_UIA2 @@ -592,9 +593,7 @@ struct rte_crypto_sym_op { * * @note * For AES-GMAC (@ref RTE_CRYPTO_AUTH_AES_GMAC) mode of - * operation, this field is not used and should be set - * to 0. Instead the AAD data should be placed in the - * source buffer. + * operation, this field is used to pass plaintext. */ phys_addr_t phys_addr; /**< physical address */ uint16_t length; /**< Length of digest */