From patchwork Mon May 22 11:00:00 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: 100285 Delivered-To: patch@linaro.org Received: by 10.140.96.100 with SMTP id j91csp191443qge; Mon, 22 May 2017 04:13:41 -0700 (PDT) X-Received: by 10.107.191.67 with SMTP id p64mr20293073iof.100.1495451621825; Mon, 22 May 2017 04:13:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1495451621; cv=none; d=google.com; s=arc-20160816; b=AWfQdIxu3klOxXzgwIlv4IOoSapUpx4KJimeeI0QnP3jYsSxFlDerVFMRcTsXOTVKO nw6JLN3d+dzjTICvq0z9krrZLhNIMAI3pDdz77SGelrK+4JZoUUnpSbQWBiOtltTuGnU PPZ2yA7kID03fAqYr6ux4F21UXjwlWNuwgpzTN4zzNAN/QSYfEGICwYzwyikoCYoOBtZ irLWXzyeSNN3ogcmTP48bwxSC+AzOVSD8ZQoV+7B2C60K8pWieiJ6Edh/hZABCK7c4bT Fabfz7sr979D+tg+gP+1gr9Yn15NyLOFQfIRjJdn3D0V2SiZWw4hMA9PbGJudcjdbJtp 6P1A== 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=+7ynTAVFJ9477IMpsZF/3mbI+97S4rf6hhM8x7kJPCg=; b=I9sqP35WVOGEPPK2OOKM3ed7rKGUXXtzOsWZpXnUb+T1shjb3TTtFAOcXs8gbWZakg LiS9tkgG0VZFympTjkRyB3qv35IyNhNpFF++qhSGQ5Y3uKHomzxS/+Bz2EHGbQkUUtmm 8MvKi1tEu+F7BzOyhGDWmmLYV2e4/yq0Rck2YQj0onJZZ6JxmwuRx2xee88wK9t2/YcF hxPZlJ41oTTNFpLuHmlg5wAFOuqHlh8urcXl+2wZsk396tYIoHHv5RPHle1nEhI9RKfg Nu75obCcj73rTF6A3ThCdZDxrHCA51p4m31IFOkV39F+CX7LElpOgc6u4sIFFCFInr8o Y+Pw== 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=fail (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id k76si7420149ita.103.2017.05.22.04.13.41; Mon, 22 May 2017 04:13:41 -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=fail (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Received: by lists.linaro.org (Postfix, from userid 109) id 5DA9960A2D; Mon, 22 May 2017 11:13:41 +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,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 00DA160B04; Mon, 22 May 2017 11:03:46 +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 0F76660722; Mon, 22 May 2017 11:03:27 +0000 (UTC) Received: from forward4h.cmail.yandex.net (forward4h.cmail.yandex.net [87.250.230.101]) by lists.linaro.org (Postfix) with ESMTPS id EA07360722 for ; Mon, 22 May 2017 11:00:54 +0000 (UTC) Received: from smtp3o.mail.yandex.net (smtp3o.mail.yandex.net [37.140.190.28]) by forward4h.cmail.yandex.net (Yandex) with ESMTP id D4306209E6 for ; Mon, 22 May 2017 14:00:53 +0300 (MSK) Received: from smtp3o.mail.yandex.net (localhost.localdomain [127.0.0.1]) by smtp3o.mail.yandex.net (Yandex) with ESMTP id 090642941036 for ; Mon, 22 May 2017 14:00:34 +0300 (MSK) Received: by smtp3o.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id EyK36iliXq-0YpeT4mH; Mon, 22 May 2017 14:00:34 +0300 (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (Client certificate not present) X-Yandex-Suid-Status: 1 0 From: Github ODP bot To: lng-odp@lists.linaro.org Date: Mon, 22 May 2017 14:00:00 +0300 Message-Id: <1495450806-27703-11-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1495450806-27703-1-git-send-email-odpbot@yandex.ru> References: <1495450806-27703-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 34 Subject: [lng-odp] [PATCH API-NEXT v1 10/16] linux-generic: crypto: explicitly disable padding for AES-GCM 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 Signed-off-by: Dmitry Eremin-Solenikov --- /** Email created from pull request 34 (lumag:crypto-update-main-new) ** https://github.com/Linaro/odp/pull/34 ** Patch: https://github.com/Linaro/odp/pull/34.patch ** Base sha: 826ee894aa0ebd09d42a17e1de077c46bc5b366a ** Merge commit sha: 225ede5cef6eb46fc9e1d1d385ac8be0b57c64f5 **/ platform/linux-generic/odp_crypto.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/platform/linux-generic/odp_crypto.c b/platform/linux-generic/odp_crypto.c index 37ce5df7..93837215 100644 --- a/platform/linux-generic/odp_crypto.c +++ b/platform/linux-generic/odp_crypto.c @@ -297,6 +297,7 @@ odp_crypto_alg_err_t aes_gcm_encrypt(odp_crypto_op_param_t *param, EVP_CIPHER_CTX_ctrl(ctx, EVP_CTRL_GCM_SET_IVLEN, session->p.iv.length, NULL); EVP_EncryptInit_ex(ctx, NULL, NULL, NULL, iv_ptr); + EVP_CIPHER_CTX_set_padding(ctx, 0); /* Authenticate header data (if any) without encrypting them */ if (aad_len > 0) @@ -344,6 +345,7 @@ odp_crypto_alg_err_t aes_gcm_decrypt(odp_crypto_op_param_t *param, EVP_CIPHER_CTX_ctrl(ctx, EVP_CTRL_GCM_SET_IVLEN, session->p.iv.length, NULL); EVP_DecryptInit_ex(ctx, NULL, NULL, NULL, iv_ptr); + EVP_CIPHER_CTX_set_padding(ctx, 0); EVP_CIPHER_CTX_ctrl(ctx, EVP_CTRL_GCM_SET_TAG, session->p.auth_digest_len, tag);