Message ID | 20170424141629.27155-9-clabbe.montjoie@gmail.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org> Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 85BEB601AE for <patchwork-linux-arm@patchwork.kernel.org>; Mon, 24 Apr 2017 14:20:39 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 76AFD27813 for <patchwork-linux-arm@patchwork.kernel.org>; Mon, 24 Apr 2017 14:20:39 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6B3EF2835B; Mon, 24 Apr 2017 14:20:39 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FROM autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 0B19D27813 for <patchwork-linux-arm@patchwork.kernel.org>; Mon, 24 Apr 2017 14:20:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=x/o784Q9GHXujlfN3QLL0tu7JX1DWmMvSaPpKMGCSv8=; b=CORCuDXfUAZ3uVNIK1qfj4HNkK RbC28sz577pLvAotgSJvJKi9N1JuLqc9B2OZQqk9coQalgM0b5cmE9PlD1Rj2rKShWCAn+Y7wvYmu tPn6yGnXx2/S38dk5PHVgn5URfMiwzYenfvw+R2/CMMwGBBfs2sUMFN51CoB/Sav3pxK+mr7LKL0J Yz2ZpacSG3jHL88MhhbgpTALvJlzdFzUEhoRdlvzBR17UsnvAc40c5phAe0c1ZFdS9/h4XMrCeRjK 6CW3VwkIl/10mg9YwpZH7eDDwjTUuxffpaPbvyhV05BKnLNUfq6AipmqsbvM2CT5uE8GthwuFTkc7 g+rkGvig==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1d2er0-0001Fw-4O; Mon, 24 Apr 2017 14:20:38 +0000 Received: from mail-wr0-x242.google.com ([2a00:1450:400c:c0c::242]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1d2epY-0006X0-8Y; Mon, 24 Apr 2017 14:19:12 +0000 Received: by mail-wr0-x242.google.com with SMTP id g12so2879548wrg.2; Mon, 24 Apr 2017 07:18:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=5YOuu5rtxjPBW2ppTh27Z5VJZvM6sDe+s1Eqpg0CbnM=; b=bPwtLfvhs7c+a3dQTGO/Pd3tGZ28nwl+gORMl1MpetsY/rBKurVeIU4uGkubDSRYc+ cwtUikmrrTXgrJMWnJhMaU28Z1Wa7IyfWlXReWZZ35styNHdP3bFAPP6JkV4QkPF+XCy ooqFthVr+rIU34PzxVktTGfjzJJEOc6Zt0Bks64g1E3Gxbm58xWP/eUGkpabNHNNw0lC rCy4QhYM7w/hYyV86dEx+TP1Znt3MmZSt+Iayqbf/B+brLT9uesXNP+y1QUpyI6B4gO1 tliuCwbKa93M1q8r3fg84xHAgImm8qyr7WyLxYrvnrR+YGzZrVHgbM7UBcn5k2qtMh1O TO4w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=5YOuu5rtxjPBW2ppTh27Z5VJZvM6sDe+s1Eqpg0CbnM=; b=ePpH7Y1t8axwLpjrG35NL6yqKNXqrxvh+U+AagGZmZprEKTkx4083EK7mO2xPi3fJ/ lU+sL6E/0O/8V3awo2WdCdOENDmkpLOj7HFexlA19upm/niIeHnVZ3MQF6J0uKMWNujK uwEIAq//Uagc+OgiStvrzvhaFyz3K0z9df6s4en7donYKoulz94F4Lf1fSkPW2sQT8aU xVWKCNoVUbWKYPFxEbcTHVRwVDujgl9jkCzDn264ycDDYsiaOzAQoulnP7cy+hdpB7zJ bnOfuGO86Gi1dcre+vwxFEeoXdotqVcAmwePahsL8/X3WbJca+86qVN/X/saqjhjn/Wg psKA== X-Gm-Message-State: AN3rC/5Pv0Hhm5Unl/ruIQOjSObLB86seBZlXj6x56VkdI9VO4hXUhu3 KfQ/O7sd0TXcUg== X-Received: by 10.223.141.171 with SMTP id o40mr6079100wrb.110.1493043530316; Mon, 24 Apr 2017 07:18:50 -0700 (PDT) Received: from Red.local (LFbn-1-7035-57.w90-116.abo.wanadoo.fr. [90.116.208.57]) by smtp.googlemail.com with ESMTPSA id q140sm548033wmb.14.2017.04.24.07.18.49 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 24 Apr 2017 07:18:49 -0700 (PDT) From: Corentin Labbe <clabbe.montjoie@gmail.com> To: herbert@gondor.apana.org.au, davem@davemloft.net, thomas.lendacky@amd.com, gary.hook@amd.com, boris.brezillon@free-electrons.com, arno@natisbad.org, matthias.bgg@gmail.com, giovanni.cabiddu@intel.com, salvatore.benedetto@intel.com Subject: [PATCH 9/9] crypto: ccp - Use IPAD/OPAD constant Date: Mon, 24 Apr 2017 16:16:29 +0200 Message-Id: <20170424141629.27155-9-clabbe.montjoie@gmail.com> X-Mailer: git-send-email 2.10.2 In-Reply-To: <20170424141629.27155-1-clabbe.montjoie@gmail.com> References: <20170424141629.27155-1-clabbe.montjoie@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170424_071908_664245_2917D006 X-CRM114-Status: UNSURE ( 9.16 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: <linux-arm-kernel.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/> List-Post: <mailto:linux-arm-kernel@lists.infradead.org> List-Help: <mailto:linux-arm-kernel-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe> Cc: qat-linux@intel.com, linux-kernel@vger.kernel.org, Corentin Labbe <clabbe.montjoie@gmail.com>, linux-crypto@vger.kernel.org, linux-mediatek@lists.infradead.org, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org> Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP |
diff --git a/drivers/crypto/ccp/ccp-crypto-sha.c b/drivers/crypto/ccp/ccp-crypto-sha.c index 6b46eea..3834366 100644 --- a/drivers/crypto/ccp/ccp-crypto-sha.c +++ b/drivers/crypto/ccp/ccp-crypto-sha.c @@ -308,8 +308,8 @@ static int ccp_sha_setkey(struct crypto_ahash *tfm, const u8 *key, } for (i = 0; i < block_size; i++) { - ctx->u.sha.ipad[i] = ctx->u.sha.key[i] ^ 0x36; - ctx->u.sha.opad[i] = ctx->u.sha.key[i] ^ 0x5c; + ctx->u.sha.ipad[i] = ctx->u.sha.key[i] ^ HMAC_IPAD_VALUE; + ctx->u.sha.opad[i] = ctx->u.sha.key[i] ^ HMAC_OPAD_VALUE; } sg_init_one(&ctx->u.sha.opad_sg, ctx->u.sha.opad, block_size);
This patch simply replace all occurrence of HMAC IPAD/OPAD value by their define. Signed-off-by: Corentin Labbe <clabbe.montjoie@gmail.com> --- drivers/crypto/ccp/ccp-crypto-sha.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)