From patchwork Tue May 9 22:07:22 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Eremin-Solenikov X-Patchwork-Id: 98956 Delivered-To: patch@linaro.org Received: by 10.140.96.100 with SMTP id j91csp2041561qge; Tue, 9 May 2017 15:07:34 -0700 (PDT) X-Received: by 10.200.37.227 with SMTP id f32mr2725438qtf.221.1494367654666; Tue, 09 May 2017 15:07:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1494367654; cv=none; d=google.com; s=arc-20160816; b=BQWkGjym4BCkNudhbpe5mjub2wwxXg9zwVY7nXmitfSGINEuMEfiFU/KoMWVJ0FlSW ta3SG2slSb4fXCMsiWbNd8PdeNBD8Cd2MoSBv0GCjzmBt1vUET6QjY4PQ7JKGOYIPDqU 6g3Gm9bwQsk3wfykwXdP4TaYowNM2PDhkv1JlwOWUygebMqqvl3xbc96KNRpUV74GhUV xW3+w8rNs2gjOP9v1y3neF13qaa3Sfvrnb8/v047meOi2CAkyIF6whL/hwQBzVD7/CQl a4MIsbXPb6mohaXF5gOsm3zsVi7N6bPTXtULnR4kkCdpQF+JMdZeTB3SzhOeaLoRGymp pI8A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:message-id:date:to:from :delivered-to:arc-authentication-results; bh=TnBulBMVsZ6DbyFNPKY07V1kvB03MCeIwPvJqfT6zO0=; b=AM17nHmQhMn5loloLLdGaMiPKza0ZczhQXzdarfRzVyttMBCX5m14X97dDDe1GixWk aO/J1yQcGUBNkwImrq8ZaZrfNiOoOBjrRvOnn6RCnY4G+I+4QeSwSFA970zG6m5GLJHO KHJGwDp7x/zx4hY/sKqAk499kq7rLxQajGgZKhIO36e4E3XKh/kK6C4/GJ4xVPqK4PVT SphSXUY6ocRbuAR2JhaD5UctWZ8aejMFBmj2eDt2rRNiKhCD3MHKMjaBieyKKcr6mOyY +czkRfWE4+0MKuhxnV7u5V8rSrNMqtitRE+JQHZlM2X8XjnxLN37od0MfhUjBoRZvBws 9BSQ== ARC-Authentication-Results: i=1; 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 sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id f34si1337709qki.186.2017.05.09.15.07.34; Tue, 09 May 2017 15:07:34 -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 sp=NONE dis=NONE) header.from=linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id E893160C13; Tue, 9 May 2017 22:07:33 +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=-4.7 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2 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 645F2607F7; Tue, 9 May 2017 22:07:28 +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 5FF6F60925; Tue, 9 May 2017 22:07:26 +0000 (UTC) Received: from mail-pf0-f176.google.com (mail-pf0-f176.google.com [209.85.192.176]) by lists.linaro.org (Postfix) with ESMTPS id 09FB360737 for ; Tue, 9 May 2017 22:07:25 +0000 (UTC) Received: by mail-pf0-f176.google.com with SMTP id v14so6309515pfd.2 for ; Tue, 09 May 2017 15:07:25 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id; bh=TnBulBMVsZ6DbyFNPKY07V1kvB03MCeIwPvJqfT6zO0=; b=KagIZ+pSx9HWd8CRedgI0U5CUC7gdWF93m7HmPvkqUzCTXkHjtElcTzncywQyhf9MB V3+L9a2NHHVBAaaF9W3A5K6ktRtg37Kv0UrgD0gFWX5da/JZp/hs2bGTHKEevqfqw4VE ms9Je5QbVeCQaaNkxWZ4QKhYM+i1pLBe8ObzWAIIBUaGqqrPbeFow0JXYsNEyjkR0lWD Xgzm2i6qQKe/g8R889gFHfIYSv5J1q6xperiJ+SmAyvfCYlIHnSCH7aEAAJeaYkMmGcT q5odM46PNu0RiIT+2xJACw5bBrk86Founs+2pph5p62v6goINknlzFCrafVR/p6PWmKn NrRA== X-Gm-Message-State: AODbwcAQ6IV3QbCtkPN5hnSer/I8KSHdfdfH4blAokyAhIkRFClFxSsm Au0yHiosyZcTIrQOi/7OcdDz X-Received: by 10.98.7.1 with SMTP id b1mr2520418pfd.20.1494367644122; Tue, 09 May 2017 15:07:24 -0700 (PDT) Received: from forlindon.cisco.com ([128.107.241.164]) by smtp.gmail.com with ESMTPSA id p10sm1438673pgf.63.2017.05.09.15.07.23 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 09 May 2017 15:07:23 -0700 (PDT) From: Dmitry Eremin-Solenikov To: lng-odp@lists.linaro.org Date: Wed, 10 May 2017 01:07:22 +0300 Message-Id: <20170509220722.9256-1-dmitry.ereminsolenikov@linaro.org> X-Mailer: git-send-email 2.11.0 Subject: [lng-odp] [PATCH] api: ipsec: add explicit nonce/salt parameter 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: , Errors-To: lng-odp-bounces@lists.linaro.org Sender: "lng-odp" CTR/GCM/CCM algorithms require static IV part provided by control party. Usually it is a part of KEYMAT returned from IKE. Signed-off-by: Dmitry Eremin-Solenikov --- include/odp/api/spec/ipsec.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) -- 2.11.0 diff --git a/include/odp/api/spec/ipsec.h b/include/odp/api/spec/ipsec.h index e83494d3..2e3421c7 100644 --- a/include/odp/api/spec/ipsec.h +++ b/include/odp/api/spec/ipsec.h @@ -360,6 +360,9 @@ typedef struct odp_ipsec_crypto_param_t { /** Cipher key */ odp_crypto_key_t cipher_key; + /** Cipher nonce/salt for CTR/GCM/CCM */ + odp_crypto_key_t cipher_nonce; + /** Authentication algorithm */ odp_auth_alg_t auth_alg; @@ -693,7 +696,9 @@ int odp_ipsec_capability(odp_ipsec_capability_t *capa); * Outputs all supported configuration options for the algorithm. Output is * sorted (from the smallest to the largest) first by key length, then by IV * length. Use this information to select key lengths, etc cipher algorithm - * options for SA creation (odp_ipsec_crypto_param_t). + * options for SA creation (odp_ipsec_crypto_param_t). Note, as usually IV + * blocks are constructed internally, the @iv_len field returns the length of + * the nonce (or salt) part, acquired from keying material. * * @param cipher Cipher algorithm * @param[out] capa Array of capability structures for output