From patchwork Wed Apr 13 12:33:15 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Balakrishna Garapati X-Patchwork-Id: 65718 Delivered-To: patch@linaro.org Received: by 10.140.93.198 with SMTP id d64csp2482237qge; Wed, 13 Apr 2016 05:41:42 -0700 (PDT) X-Received: by 10.140.100.184 with SMTP id s53mr10568161qge.19.1460551302559; Wed, 13 Apr 2016 05:41:42 -0700 (PDT) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id l34si8093689qgf.84.2016.04.13.05.41.42; Wed, 13 Apr 2016 05:41:42 -0700 (PDT) Received-SPF: pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) client-ip=54.225.227.206; Authentication-Results: mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dmarc=pass (p=NONE dis=NONE) header.from=linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id 3619468355; Wed, 13 Apr 2016 12:41:42 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on ip-10-142-244-252 X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, URIBL_BLOCKED autolearn=disabled version=3.4.0 Received: from [127.0.0.1] (localhost [127.0.0.1]) by lists.linaro.org (Postfix) with ESMTP id A46336834E; Wed, 13 Apr 2016 12:41:38 +0000 (UTC) X-Original-To: lng-odp@lists.linaro.org Delivered-To: lng-odp@lists.linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id 64DE66834E; Wed, 13 Apr 2016 12:41:37 +0000 (UTC) Received: from mail-lf0-f43.google.com (mail-lf0-f43.google.com [209.85.215.43]) by lists.linaro.org (Postfix) with ESMTPS id 0DE8B68345 for ; Wed, 13 Apr 2016 12:41:35 +0000 (UTC) Received: by mail-lf0-f43.google.com with SMTP id c126so67690595lfb.2 for ; Wed, 13 Apr 2016 05:41:34 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:subject:date:message-id; bh=3BGiuj//5tN2a3+ezMg+z25YxRpBkGDRwfQoUm0H/AU=; b=A4jKoSsIEtFTgBp/XJUEYGRaDSXCDylR6CrQGSx4+iZBNDBTiB1dqHLgQKSPzbJsEq uLGcYQBra8RA0d2mFXvR9nAMjLpoZjt11yQXu0wT47s3GJhdl5wAFSGh46brHc2cNuMt xrdEDbhoBC0XXF0s/I2oJMltdSCr/mJg51eX9klfy0vAJP/xpgPeb8GmdNfK9kenP5FV 1wk05XPYulkvkhD78vMfKs6R8Zx3hCa3YTBjkZnCwRlS/0Gjc55qnZGgrvYdo6l8s5kK 8UXMqakQgkfK6YHssO+nR4tSL6mkaj3MmC9cg3OttpADcNysT49lDHrfllzDmZRxsUem xPnw== X-Gm-Message-State: AOPr4FX2Ug0q3VZFqTYPPQzvLWJjXL1ct77KGbIDxc6wh1x38e29X+A5Q+4v3B2SkXABZV/SYw4= X-Received: by 10.112.142.229 with SMTP id rz5mr4030484lbb.111.1460550822934; Wed, 13 Apr 2016 05:33:42 -0700 (PDT) Received: from elxahtkds32.localdomain (host-95-192-76-31.mobileonline.telia.com. [95.192.76.31]) by smtp.gmail.com with ESMTPSA id l5sm6142089lbw.44.2016.04.13.05.33.41 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 13 Apr 2016 05:33:42 -0700 (PDT) From: Balakrishna Garapati To: lng-odp@lists.linaro.org Date: Wed, 13 Apr 2016 14:33:15 +0200 Message-Id: <1460550795-16289-1-git-send-email-balakrishna.garapati@linaro.org> X-Mailer: git-send-email 1.9.1 X-Topics: crypto Subject: [lng-odp] [RFC] api: crypto capability support X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: "The OpenDataPlane \(ODP\) List" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: lng-odp-bounces@lists.linaro.org Sender: "lng-odp" This RFC provides the support for the applicationis to inquire the given cipher, authentication algorithms Signed-off-by: Balakrishna Garapati --- include/odp/api/spec/crypto.h | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/include/odp/api/spec/crypto.h b/include/odp/api/spec/crypto.h index 41beedb..0def211 100644 --- a/include/odp/api/spec/crypto.h +++ b/include/odp/api/spec/crypto.h @@ -254,6 +254,18 @@ typedef struct odp_crypto_op_result { } odp_crypto_op_result_t; /** + * Crypto API capability result + */ +typedef enum odp_crypto_capability_t { + /** crypto algorithm not supported */ + ODP_CRYPTO_NO_SUPPORT = 0, + /** crypto algorithm supported in hardware */ + ODP_CRYPTO_HW_SUPPORT, + /** crypto algortihm supported in software */ + ODP_CRYPTO_SW_SUPPORT +} odp_crypto_capability_t; + +/** * Crypto session creation (synchronous) * * @param params Session parameters @@ -368,6 +380,24 @@ uint64_t odp_crypto_session_to_u64(odp_crypto_session_t hdl); uint64_t odp_crypto_compl_to_u64(odp_crypto_compl_t hdl); /** + * Verify the given crypto cipher algorithm support + * + * @param alg odp_cipher_alg_t to be verified + * @return odp_crypto_capability_t + * + */ +odp_crypto_capability_t odp_crypto_cipher_inquiry(odp_cipher_alg_t alg); + +/** + * Verify the given crypto authentication algorithm support + * + * @param alg odp_auth_alg_t to be verified + * @return odp_crypto_capability_t + * + */ +odp_crypto_capability_t odp_crypto_auth_inquiry(odp_auth_alg_t alg); + +/** * @} */