From patchwork Wed Nov 8 18:00:07 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Github ODP bot X-Patchwork-Id: 118298 Delivered-To: patch@linaro.org Received: by 10.140.22.164 with SMTP id 33csp5595895qgn; Wed, 8 Nov 2017 10:01:25 -0800 (PST) X-Google-Smtp-Source: ABhQp+QeO9Lk/HBDQEmWzcpjrWwckER4Ci05G9ppmJ7GNF1FC4JfBFYc4nGUMg/kRAjM5ndqAR1R X-Received: by 10.37.128.81 with SMTP id a17mr940760ybn.31.1510164085656; Wed, 08 Nov 2017 10:01:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1510164085; cv=none; d=google.com; s=arc-20160816; b=A77PRxzI0DYC/qP1H1BAersUnWkBt6oknekdLXfQ9GDcyqrFe1+DJDxtyj9/FoK+VT EwiDnKPis50uKY5LnVZ0/MVRYy46V4ztcA3PQ/RJbkO5IFCxsRpaX0WLyDuJwB9V0Iak 8KbvvU3d7xcqrUbK0xJAdwNUWm9WdtqZ6kBG2iJJqG5A4A5hfuFGNu6s8F3M9ixjiFgn T9T/GElWfD6iCSVPr/n0hLVSfIhBY7tyof+LqH9se6O9+RHpyZFRcRDtgZasbaxzvS1U Un5ZPApgwPby/IqwQonopguUGCFnVQJrpdrJQ33taT83hz9imX5szFHcX5LZj6lvCBxI AXJg== 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=9xmW/n5EZo/SyaOAS+PofcFEZJUpzgYTx+/O7KoETHE=; b=Emd/UN66Tn1ZrvIMrtjoj4gQejbS3MO8k+KhzK3npEWdIJ0A+q6C+sw9pxddZvWzIz iJ26lk4qfCYjP46FbFVJ//zm9c9KUJmtFOOBjLrRIH86FV3hkQlAaC+W8pRqXxSJKRCJ yFMUEO+cxJqhoSckRQ0PyuedE79NV6gGVYg50rqYRzTtkdehmAVtuN1IVQaSyDa8aeZc UJJTAZfzEb0+JERlSTPGDqPAH13A/YFbUs+SMTGXH9qjDeysny7bK+/S3/vYNyJxHBhQ m0wEnJE55Np8Pq16/VoHt3J8izzsTXLwEWWMQESk3Mq5RCiB5k9Sat/Ep56fWGOpIZkx YBIg== 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 63si4273040qkl.106.2017.11.08.10.01.25; Wed, 08 Nov 2017 10:01:25 -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 3C0FB6100D; Wed, 8 Nov 2017 18:01:25 +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=-5.4 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2, 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 CF3586069D; Wed, 8 Nov 2017 18:00:26 +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 D6AB26069D; Wed, 8 Nov 2017 18:00:15 +0000 (UTC) Received: from forward104p.mail.yandex.net (forward104p.mail.yandex.net [77.88.28.107]) by lists.linaro.org (Postfix) with ESMTPS id E0BF46065A for ; Wed, 8 Nov 2017 18:00:10 +0000 (UTC) Received: from mxback17j.mail.yandex.net (mxback17j.mail.yandex.net [IPv6:2a02:6b8:0:1619::93]) by forward104p.mail.yandex.net (Yandex) with ESMTP id 14BB3183B4B for ; Wed, 8 Nov 2017 21:00:09 +0300 (MSK) Received: from smtp4o.mail.yandex.net (smtp4o.mail.yandex.net [2a02:6b8:0:1a2d::28]) by mxback17j.mail.yandex.net (nwsmtp/Yandex) with ESMTP id PYwnfeQs7z-08vWrjU9; Wed, 08 Nov 2017 21:00:09 +0300 Received: by smtp4o.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id WISXMjAzp0-08FunxXo; Wed, 08 Nov 2017 21:00:08 +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: Wed, 8 Nov 2017 21:00:07 +0300 Message-Id: <1510164007-14207-2-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1510164007-14207-1-git-send-email-odpbot@yandex.ru> References: <1510164007-14207-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 289 Subject: [lng-odp] [PATCH v1 1/1] linux-gen: crypto: drop DES-CBC 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: , Errors-To: lng-odp-bounces@lists.linaro.org Sender: "lng-odp" From: Dmitry Eremin-Solenikov DES-CBC (not 3DES-CBC) support is invalid (DES should use 8 bytes key, not 24 bytes), it is not covered by testsuite and DES is cracable/deprecated/etc since long ago. Stop providing single-key DES support. In case one really needs it, it can be emulated through supplying same key triple times to 3DES-CBC. Signed-off-by: Dmitry Eremin-Solenikov --- /** Email created from pull request 289 (lumag:nodes) ** https://github.com/Linaro/odp/pull/289 ** Patch: https://github.com/Linaro/odp/pull/289.patch ** Base sha: 29c7a054f7151d33795a0d8d7df5594bf4fddb55 ** Merge commit sha: 98de673e13800b64d64bbfd36986b25895fc82a4 **/ platform/linux-generic/odp_crypto.c | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/platform/linux-generic/odp_crypto.c b/platform/linux-generic/odp_crypto.c index 40b6d74b4..d79836671 100644 --- a/platform/linux-generic/odp_crypto.c +++ b/platform/linux-generic/odp_crypto.c @@ -25,7 +25,6 @@ #include #include -#include #include #include #include @@ -40,9 +39,6 @@ static const odp_crypto_cipher_capability_t cipher_capa_null[] = { {.key_len = 0, .iv_len = 0} }; -static const odp_crypto_cipher_capability_t cipher_capa_des[] = { -{.key_len = 24, .iv_len = 8} }; - static const odp_crypto_cipher_capability_t cipher_capa_trides_cbc[] = { {.key_len = 24, .iv_len = 8} }; @@ -582,7 +578,6 @@ int odp_crypto_capability(odp_crypto_capability_t *capa) memset(capa, 0, sizeof(odp_crypto_capability_t)); capa->ciphers.bit.null = 1; - capa->ciphers.bit.des = 1; capa->ciphers.bit.trides_cbc = 1; capa->ciphers.bit.aes_cbc = 1; capa->ciphers.bit.aes_gcm = 1; @@ -620,10 +615,6 @@ int odp_crypto_cipher_capability(odp_cipher_alg_t cipher, src = cipher_capa_null; num = sizeof(cipher_capa_null) / size; break; - case ODP_CIPHER_ALG_DES: - src = cipher_capa_des; - num = sizeof(cipher_capa_des) / size; - break; case ODP_CIPHER_ALG_3DES_CBC: src = cipher_capa_trides_cbc; num = sizeof(cipher_capa_trides_cbc) / size; @@ -737,7 +728,6 @@ odp_crypto_session_create(odp_crypto_session_param_t *param, session->cipher.func = null_crypto_routine; rc = 0; break; - case ODP_CIPHER_ALG_DES: case ODP_CIPHER_ALG_3DES_CBC: rc = process_cipher_param(session, EVP_des_ede3_cbc()); break;