From patchwork Thu May 4 12:55:57 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Petri Savolainen X-Patchwork-Id: 98534 Delivered-To: patch@linaro.org Received: by 10.140.89.200 with SMTP id v66csp569933qgd; Thu, 4 May 2017 05:56:45 -0700 (PDT) X-Received: by 10.237.43.66 with SMTP id p60mr41025304qtd.257.1493902605877; Thu, 04 May 2017 05:56:45 -0700 (PDT) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id o41si1797914qto.208.2017.05.04.05.56.45; Thu, 04 May 2017 05:56:45 -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 9583060969; Thu, 4 May 2017 12:56:45 +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=BAD_ENC_HEADER,BAYES_00, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_PASS 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 4BA2060957; Thu, 4 May 2017 12:56:16 +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 A72846084C; Thu, 4 May 2017 12:56:13 +0000 (UTC) Received: from EUR02-VE1-obe.outbound.protection.outlook.com (mail-eopbgr20107.outbound.protection.outlook.com [40.107.2.107]) by lists.linaro.org (Postfix) with ESMTPS id AA4386084C for ; Thu, 4 May 2017 12:56:12 +0000 (UTC) Received: from AM4PR07CA0033.eurprd07.prod.outlook.com (2603:10a6:205:1::46) by AM2PR07MB0897.eurprd07.prod.outlook.com (2a01:111:e400:8428::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1084.7; Thu, 4 May 2017 12:56:10 +0000 Received: from DB5EUR03FT042.eop-EUR03.prod.protection.outlook.com (2a01:111:f400:7e0a::203) by AM4PR07CA0033.outlook.office365.com (2603:10a6:205:1::46) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1075.1 via Frontend Transport; Thu, 4 May 2017 12:56:11 +0000 Received-SPF: SoftFail (protection.outlook.com: domain of transitioning linaro.org discourages use of 131.228.2.241 as permitted sender) Received: from mailrelay.int.nokia.com (131.228.2.241) by DB5EUR03FT042.mail.protection.outlook.com (10.152.21.123) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.1047.9 via Frontend Transport; Thu, 4 May 2017 12:56:10 +0000 Received: from fihe3nok0735.emea.nsn-net.net (localhost [127.0.0.1]) by fihe3nok0735.emea.nsn-net.net (8.14.9/8.14.5) with ESMTP id v44Ctvum019419 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 4 May 2017 15:55:57 +0300 Received: from 10.144.19.15 ([10.144.104.219]) by fihe3nok0735.emea.nsn-net.net (8.14.9/8.14.5) with ESMTP id v44CtvoO019391 (version=TLSv1/SSLv3 cipher=AES128-SHA256 bits=128 verify=NOT) for ; Thu, 4 May 2017 15:55:57 +0300 X-HPESVCS-Source-Ip: 10.144.104.219 From: Petri Savolainen To: Date: Thu, 4 May 2017 15:55:57 +0300 Message-ID: <20170504125557.21688-2-petri.savolainen@linaro.org> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170504125557.21688-1-petri.savolainen@linaro.org> References: <20170504125557.21688-1-petri.savolainen@linaro.org> X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report: CIP:131.228.2.241; IPV:CAL; CTRY:FI; EFV:NLI; SFV:NSPM; SFS:(10019020)(6009001)(39450400003)(39850400002)(39400400002)(39860400002)(39840400002)(39410400002)(2980300002)(199003)(189002)(9170700003)(48376002)(50466002)(50226002)(5003940100001)(77096006)(1076002)(8936002)(8676002)(189998001)(305945005)(81166006)(498600001)(86362001)(76176999)(50986999)(356003)(106466001)(38730400002)(110136004)(36756003)(33646002)(2906002)(5660300001)(53936002)(6916009)(2950100002)(105596002)(2351001)(22756006)(47776003)(217873001); DIR:OUT; SFP:1102; SCL:1; SRVR:AM2PR07MB0897; H:mailrelay.int.nokia.com; FPR:; SPF:SoftFail; MLV:sfv; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; DB5EUR03FT042; 1:FjJRg6qcBPyn0I0adTnutd3cFkqb4QC7XXwBbR5sjB1vdowkmRarY1OyGQ7T7/JXsLxseOlMZMQccSfAnRddjmbASh8r37Cd6aouAs5ay/jKcmP77SGOYNZYCHq1O3Zf/7DxyBRVW/7k1EK9RmhHwfSB14seZi2uC9xVGnN9hv8mooVFASWjbuiGh4G2irHxLNVdYwVzShfc0MCl8ol+wgcu5Ost4W9eKqaY9rs7Hpr6yaksUy0IPVum1skS2mB6n9YV5oEQa78IOOr7EA8vDFAHzipNmpdptFRxBTe0SMwlrB1gA/87/GeLqfvSF+PX2s80YBArUpFdtewW2zkMdSv45S8kDgIBVFKPoE/fE+AycV8YbAvd3W+pv0ceO+r6i7l/STtJlfu4EX8ZhgnjmU8LCr+if/SsgSAwTiNQ7a3U7GcEi8/7QuwflWHP5POKH58t8yHmR4dhW2itoCDbVnsKOpCvFj8pZVtKnWN9ZLbl8tDijI7NNV6uD3C/Rcj+9jzEeGAtTHlun74StGWLLg== MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 843980cc-0126-4355-66f7-08d492ecf041 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(2017030254075)(201703131423075)(201703031133081); SRVR:AM2PR07MB0897; X-Microsoft-Exchange-Diagnostics: 1; AM2PR07MB0897; 3:6o76YQZHs3jrFxBXRDZReh6RRK8U3bDTLtS7wBjPmMObvzimWQLMXl9GM8+SauzZB/OaaqILuam3JYmW6CWnUGTgDSs334vvK7SayQHUFvjmjKxtsRt0jOtlC3DJu1/AoQf3sN0LICIW4NhVV/glYpteHrEafpQ1Y9VdaaXwzoPuIURmpiwXOTPSKIa9CqSe4yq3YLGT2Dr2+fY5f3usAaIrkKnIrzYOVtNY5L2ce441tFgB+NrZlyRZTYs3xsiw8a4fbugZZn0RbXrWymz36WvzCvyIe9LRWE/Pli39C1mc53LTopUyJN4qSUBnE1wSSNkFNrQ1PwOBiCjaWC/Moau4MXV/hXAfvLVzdtjccJsVPTCgxfOf+Cqczn7EFTqgXmK+SsJjapw98XITOdXzlh5prvKj3MlC4unQVEvFMdYUy8WKhnZYEd0A54LtacHkReTO4g0wMEy5piqrY+6G6w== X-Microsoft-Exchange-Diagnostics: 1; AM2PR07MB0897; 25:d1VTOt6hYw75E1lNjrP9OlK53gvehQdK/adIQXv+xFoJgbspKVJr3yCutacvseEBHaT9luivzUjbM+929uw6xJ+U++fw0d+1zjjLQhuU1ltM+bEJA/6FUmJuVdDUCndfuSN8PzYQOWBHcWgLqBmOjG+pnnjyPXPn4kyJ9yYfsn7s5AVL5u1ROigGxkteI21T9u3gRYjJYdUnPuZWkFk30Ijtz+E6JmPGeim5MClITPqWAQRgy6pXEHu98aq7Pe6LwwLrnLqs5MzRmBXY14skwQNz4vxshDF0gKNCmC2sCfdMniwYEYu06BJFUi2S18jlmhI4LH+Hb940F91isvPiTW9wl74osyFEIZucVI430vo0j0K6g8/ao9buC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: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040450)(601004)(2401047)(13013025)(5005006)(8121501046)(13023025)(13021025)(10201501046)(3002001)(93006095)(93003095)(6055026)(6041248)(20161123562025)(20161123555025)(20161123560025)(201703131423075)(201702281528075)(201703061421075)(201703061750153)(20161123564025)(20161123558100)(6072148); SRVR:AM2PR07MB0897; BCL:0; PCL:0; RULEID:; SRVR:AM2PR07MB0897; X-Microsoft-Exchange-Diagnostics: 1; AM2PR07MB0897; 4:CbceSfwdcRYtjTT+woHwQauHUHpWejHuTV0TlSBliTqIKWDAmAFg0DhSvKKnTVfUHD5zRsWjlw+mj+fu116NzL/VVb6wDFQYWxUYGJl4dg/4SmKI2aPkpKU9bsZEHRHVHyRBoMTbB6g9D1v0mVcDj73ktD10P5V+BdsfMnaAiZDbI6NXPVSkR4+iRhd0M3QGixfMGQrh7mUzpD5LX7UFVNdbIEnGaudeLugQzdTm2m76tPXtszeIE59RAVisWaUqUkBG2LieA/1S+WRPv7bcpOoEdfihW3QBNT1StltACjAd6NzzbeYmA2QiOr3sTso4tLMbjjl8iHZpI5itx1b1l1SwYZxYP+/UEof2nkU79iBvtD42R4j78viHcjsEf9TzBa2rjmMhOIemfYbXdS9gl5UodqrB4RQXFKtc8czVi7BhbvRV+Ca1ofTykWIwcRmFktaUW2k7YyfHxLoukEA/ADmQdJVATk2mREGDWXqKZhISIZUq+funZOfcWB8d2I7gmSiup5PSkOtDkgs7Suk7swh6Tesw1R79H31mdeAmmyU5hHO52MYxJXUdJk8+S42kugJAeLPCsr8fY2ynNG7RlMLU08yl59ep/KlF78RKUCvkyVQXOXoMq+zeURZ5d/jQp6Gxs8X+P4yRHfOYkIDcQr2N16ptiL5k9lgsec3G8aaI5YNwihLAZpbjJmrKH5S3V0gRkVrY8iFW+9dR2j1BIYouAP1krq5Zgi+aEB5ng8siafGX1GGEQ4nacGsia5B+6PkN2Xmg+yZZzNNPqFv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2wKPDOYD3otEY= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; AM2PR07MB0897; 7:ylStOXGM34+sCdIMS8r16TPgEAuL3HxTXR6o9A9Wz53OBWZ1l+gUMU2V2dRmEOAAM2K+RN00SDFRZnJvU5sVX4QRNAbbkNKMe9aoOEzelDpy6qHALRQSpzg9PJzQWFZjMPlrTeQA0Lg1NlNvmBKgf0EI6S8MeZgbpMwePaibkginNGbR7k0NBPMCSTUaqg//9pLwdXjCa33LewrRMNwAM2MQjV99OVRfB9ZGRLTEc192OO6jqinfCBAicBMDKCQc2pJV8qrH8Jg46uCVWZ9u2kc3CqQZC8IYIAlKW6u8oqPFnkCPqTQ/UJXMHxaMIZdtfoPEwdkxLvdAmNLIBV+ftw== X-OriginatorOrg: nokia.onmicrosoft.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 May 2017 12:56:10.4964 (UTC) X-MS-Exchange-CrossTenant-Id: 5d471751-9675-428d-917b-70f44f9630b0 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=5d471751-9675-428d-917b-70f44f9630b0; Ip=[131.228.2.241]; Helo=[mailrelay.int.nokia.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM2PR07MB0897 Subject: [lng-odp] [API-NEXT PATCH 2/2] api: crypto: add AAD operation parameters 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" Authentication capabilities list supported AAD lengths per algorithm, but application did not have means to select which length is used. Also pointer to AAD is added, since it may be constructed also outside of packet data. Signed-off-by: Petri Savolainen --- include/odp/api/spec/crypto.h | 10 ++++++++++ 1 file changed, 10 insertions(+) -- 2.11.0 diff --git a/include/odp/api/spec/crypto.h b/include/odp/api/spec/crypto.h index 76977204..1f83e819 100644 --- a/include/odp/api/spec/crypto.h +++ b/include/odp/api/spec/crypto.h @@ -375,6 +375,16 @@ typedef struct odp_crypto_op_param_t { */ uint32_t hash_result_offset; + /** Additional Authenticated Data (AAD) */ + struct { + /** Pointer to ADD */ + uint8_t *ptr; + + /** AAD length in bytes. Use odp_crypto_auth_capa() for + * supported AAD lengths. */ + uint32_t length; + } aad; + /** Data range to apply cipher */ odp_crypto_data_range_t cipher_range;