From patchwork Fri Feb 16 21:00:16 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Github ODP bot X-Patchwork-Id: 128638 Delivered-To: patch@linaro.org Received: by 10.46.124.24 with SMTP id x24csp974800ljc; Fri, 16 Feb 2018 13:01:15 -0800 (PST) X-Google-Smtp-Source: AH8x226b3Y/1n5YU01ruYs4pp7uC84oOZNWqqHSD3aRq7qtqqaUvNK+SnXYTT/uUYrUYXS1UrkJo X-Received: by 10.200.9.86 with SMTP id z22mr12126859qth.87.1518814875550; Fri, 16 Feb 2018 13:01:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518814875; cv=none; d=google.com; s=arc-20160816; b=IUQYmemCiYP8w5ZFx3zgPdh5jus54ZKfmQqyrQ/u3LA4TYlkIULjk5sfhX/qG5jc/O ozStN2qycXSXLqJ0ryMJ+0Gf3yiKM2wfjT69G9yRZRweXxS4qjTvz8D5DkKjS/+5jtzB 4hm0sXxUA59NPk9tQzrCqLlP+H19HXbsGbgepejieUZq1rxuAmWW24cVjruaFSpEWCJn bIRuP9hapgMAMzZGJiGyjCwlaUI1JujYIb98+MQivnC/lAfyIFZSqDLWEGKkMaBLkpDj rFZrVZKTyhzQ1shlgQxXVWCNb700XJwNM2IQjGeySEVhWspwazKvX6FYbZX0HLw4TSmt b0QA== 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:github-pr-num :references:in-reply-to:message-id:date:to:from:delivered-to :arc-authentication-results; bh=vnP559eHBXbzhy1eBRZUS7uyreBkans6AAevnJm4kRg=; b=R1ebEZlsQr7yBMJgrGlpf+jdUubrnzJCBEThBZ7pk6iNCZ7qDEEQllzDj5kdSyn9Ef T0smRWQCzZTqogJn1ETZiD+63RAyFngdpujnOAMAHisdi7SnS4WhvkMHfcR+h+8F/ilT MoHssLuISsKco4nLibljCoeDu1CCd6Bbhm5VWnoE/xQ47PVT5GNw5rcdvBRKSa2nOYRZ CCOfDGRPE+jdReXIAsBz7gNK1QKVvT8UCHOun4J4YLtShX1oJvelNzr+5jOYVkngJhlA HRHT3ZZMhDtyY2FKlhnjv6v4kO+avnsUrcxjqSy7MQq6/YV5kJm4K7XHjCu0raXu9YXD V56w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.197.127.237 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Return-Path: Received: from lists.linaro.org (ec2-54-197-127-237.compute-1.amazonaws.com. [54.197.127.237]) by mx.google.com with ESMTP id t30si1361956qkj.13.2018.02.16.13.01.11; Fri, 16 Feb 2018 13:01:15 -0800 (PST) Received-SPF: pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.197.127.237 as permitted sender) client-ip=54.197.127.237; Authentication-Results: mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.197.127.237 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Received: by lists.linaro.org (Postfix, from userid 109) id 51BFA617BC; Fri, 16 Feb 2018 21:01:11 +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,FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL 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 C5F5D608AA; Fri, 16 Feb 2018 21:00:32 +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 37B7F608DF; Fri, 16 Feb 2018 21:00:26 +0000 (UTC) Received: from forward102j.mail.yandex.net (forward102j.mail.yandex.net [5.45.198.243]) by lists.linaro.org (Postfix) with ESMTPS id 0879A60865 for ; Fri, 16 Feb 2018 21:00:22 +0000 (UTC) Received: from mxback8o.mail.yandex.net (mxback8o.mail.yandex.net [IPv6:2a02:6b8:0:1a2d::22]) by forward102j.mail.yandex.net (Yandex) with ESMTP id A3A0C5604341 for ; Sat, 17 Feb 2018 00:00:20 +0300 (MSK) Received: from smtp2j.mail.yandex.net (smtp2j.mail.yandex.net [2a02:6b8:0:801::ac]) by mxback8o.mail.yandex.net (nwsmtp/Yandex) with ESMTP id 46VHAEimbr-0KTiC7MG; Sat, 17 Feb 2018 00:00:20 +0300 Received: by smtp2j.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id A5sQrqtPc3-0KxWfvbs; Sat, 17 Feb 2018 00:00:20 +0300 (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (Client certificate not present) From: Github ODP bot To: lng-odp@lists.linaro.org Date: Sat, 17 Feb 2018 00:00:16 +0300 Message-Id: <1518814818-27115-2-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1518814818-27115-1-git-send-email-odpbot@yandex.ru> References: <1518814818-27115-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 464 Subject: [lng-odp] [PATCH API-NEXT v1 1/3] api: crypto: provide definitions for 3GPP crypto algorithms 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" From: Dmitry Eremin-Solenikov Add enumeration definitions for KASUMI F8/F9, SNOW 3G UEA2/UIA2 and ZUC 128-EEA3/128-EIA3 algorithms. Signed-off-by: Dmitry Eremin-Solenikov --- /** Email created from pull request 464 (lumag:crypto-3gpp) ** https://github.com/Linaro/odp/pull/464 ** Patch: https://github.com/Linaro/odp/pull/464.patch ** Base sha: af7be638ef9ac98bdb1f2e4917f152889eb1850f ** Merge commit sha: da657b8b144e5fd9f465c0a4a0698ecd7dad4eef **/ include/odp/api/spec/crypto.h | 57 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) diff --git a/include/odp/api/spec/crypto.h b/include/odp/api/spec/crypto.h index c59f66023..654ae7bb9 100644 --- a/include/odp/api/spec/crypto.h +++ b/include/odp/api/spec/crypto.h @@ -110,6 +110,24 @@ typedef enum { */ ODP_CIPHER_ALG_CHACHA20_POLY1305, + /** Confidentiality F8 algorithm (UEA1) + * + * KASUMI-based F8 algorithm (also known as UEA1). + */ + ODP_CIPHER_ALG_KASUMI_F8, + + /** Confidentiality UEA2 algorithm (128-EEA1) + * + * SNOW 3G-based UEA2 algorithm (also known as 128-EEA1). + */ + ODP_CIPHER_ALG_SNOW3G_UEA2, + + /** Confidentiality 128-EEA3 algorithm + * + * ZUC-based 128-EEA3 algorithm. + */ + ODP_CIPHER_ALG_ZUC_EEA3, + /** @deprecated Use ODP_CIPHER_ALG_AES_CBC instead */ ODP_DEPRECATE(ODP_CIPHER_ALG_AES128_CBC), @@ -214,6 +232,27 @@ typedef enum { */ ODP_AUTH_ALG_CHACHA20_POLY1305, + /** Integrity F9 algorithm (UIA1) + * + * KASUMI-based F9 algorithm (also known as UIA1). + * + * IV (9 bytes) is a concatenation of COUNT (32b), FRESH (32b) and + * DIRECTION (LSB-aligned, 1b). + */ + ODP_AUTH_ALG_KASUMI_F9, + + /** Integrity UIA2 algorithm (128-EEA1) + * + * SNOW 3G-based UIA2 algorithm (also known as 128-EIA1). + */ + ODP_AUTH_ALG_SNOW3G_UIA2, + + /** Integrity 128-EIA3 algorithm + * + * ZUC-based 128-EIA3 algorithm. + */ + ODP_AUTH_ALG_ZUC_EIA3, + /** @deprecated Use ODP_AUTH_ALG_MD5_HMAC instead */ ODP_DEPRECATE(ODP_AUTH_ALG_MD5_96), @@ -255,6 +294,15 @@ typedef union odp_crypto_cipher_algos_t { /** ODP_CIPHER_ALG_CHACHA20_POLY1305 */ uint32_t chacha20_poly1305 : 1; + /** ODP_CIPHER_ALG_KASUMI_F8 */ + uint32_t kasumi_f8 : 1; + + /** ODP_CIPHER_ALG_SNOW3G_UEA2 */ + uint32_t snow3g_uea2 : 1; + + /** ODP_CIPHER_ALG_ZUC_EEA3 */ + uint32_t zuc_eea3 : 1; + /** @deprecated Use aes_cbc instead */ uint32_t ODP_DEPRECATE(aes128_cbc) : 1; @@ -312,6 +360,15 @@ typedef union odp_crypto_auth_algos_t { /** ODP_AUTH_ALG_CHACHA20_POLY1305 */ uint32_t chacha20_poly1305 : 1; + /** ODP_AUTH_ALG_KASUMI_F9 */ + uint32_t kasumi_f9 : 1; + + /** ODP_AUTH_ALG_SNOW3G_UIA2 */ + uint32_t snow3g_uia2 : 1; + + /** ODP_AUTH_ALG_ZUC_EIA3 */ + uint32_t zuc_eia3 : 1; + /** @deprecated Use md5_hmac instead */ uint32_t ODP_DEPRECATE(md5_96) : 1;