Message ID | 20170519065331.27670-7-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 02ADF601C2 for <patchwork-linux-arm@patchwork.kernel.org>; Fri, 19 May 2017 06:57:32 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id F2A32288A6 for <patchwork-linux-arm@patchwork.kernel.org>; Fri, 19 May 2017 06:57:31 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E7128288A9; Fri, 19 May 2017 06:57:31 +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 AC224288A6 for <patchwork-linux-arm@patchwork.kernel.org>; Fri, 19 May 2017 06:57:31 +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=9LrEfTAhIag/ld3W6IrzdOj1apumllA9hfx4XVUOfDw=; b=YxUhUdUOkJwHzl7xzJ1eiF8Hzm TxXff0tcpeUQ7PbWtgQNpw06jOpmcag5buJZpapHMlJqWAQsKWhcMlf7XlyS3IcwE4wrV94Krd+iM eVWgX+N9IFnxM6PMXfStBLTPQBG5aKqxW6B2TVwfKzaWuPd0MiHvS9mbx0n1nlpcKbSsr0W/EkEpF v/HyMkOV5MsnUpCuP23W5n3LjqIg2pIBkpxGlsDMP/WYaxt9dikbQkEEAz9pFBlFuXftwqK6HO6le 9A8BDNnyZ68UL94yS8tvCB/XXpTGK8GGPVeZllEIk9lxhJiFb2JcXun8fkNCNm3P5ork7BuHb/+0p N8PtaoYA==; 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 1dBbqr-0005Op-GW; Fri, 19 May 2017 06:57:29 +0000 Received: from mail-wm0-x243.google.com ([2a00:1450:400c:c09::243]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1dBbpb-0004Qy-3l; Fri, 19 May 2017 06:56:12 +0000 Received: by mail-wm0-x243.google.com with SMTP id d127so16122393wmf.1; Thu, 18 May 2017 23:55:53 -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=1zKhi1tfvCAZWnNC4bwGoNrvZYLI/2j2LSXqwe7opP0=; b=hiS10k0DWECD2V7iUFdbp4T4b/acstnpGEL1shmWhCDZ8FXf/F9M3VhsH3GlEJpSwN Q1m3mxvOPVyYX3qXcPH3IVkBWNM2YVCAeSGIxju+QTGkzTwOOCJZ7eIo5qKhBoGOX1VW iMpwgkQXn/PemqVEqOUqLwaoG0yAygiPXzC8Bw7Ed0dmS3MkFao3Yg9FRPUsnibaQuE3 LeK1xJRlqRSgFK/RLTHmv9V0AYRMT8ZXjOApfHjuUcZePb0qkYDFTP4AXMugqN8RB6NI kDcQgmHV76Rbikd6ij9/jzf2OOKuo86z2T9ykpWr5VGAVl5/BKebJg0yWkSUpVaGvCAM 8epA== 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=1zKhi1tfvCAZWnNC4bwGoNrvZYLI/2j2LSXqwe7opP0=; b=dIu9vabMzzYqAfpBTf6F32lqdEgegB1uLvBvVgrX+J2bK9IyxV2AjxTf/7w7/70cZJ mewiekpR4ZbJLoWtc6mKkVFuI1iSPJi1cYwaM70Fs15ULTOpbrwf/CZmKyuFNY0A+vxr wgE7MtiIE2SD3CR9rZ2QS9drtx7rgp2cqeCtqNo6JaOmCzRM0eS/Nkn9IXsv0XWXPQ5+ 4WemTKCiietoRszSY3I7b5w1R1u86DmXqXD8HPfR/GmYiMVAUKBYy4A2+XyQO9ak0w1U P/AvgV8eO0AhnRNGh/2t2JiggaZ7pjIrbLkdgFXJhKuUrqE5CLO30pPLt0aFRZJtr60G H5wA== X-Gm-Message-State: AODbwcAP3YLtqlkgCOVN+zi2dkkiIw7gd0SlJDjmMOSKpvyd3FCYWnSQ B2pdLFbeOkhDPg== X-Received: by 10.28.140.132 with SMTP id o126mr5127222wmd.67.1495176952642; Thu, 18 May 2017 23:55:52 -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 1sm3256734wrw.32.2017.05.18.23.55.51 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 18 May 2017 23:55:52 -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 v2 6/9] crypto: omap-sham - Use IPAD/OPAD constant Date: Fri, 19 May 2017 08:53:28 +0200 Message-Id: <20170519065331.27670-7-clabbe.montjoie@gmail.com> X-Mailer: git-send-email 2.13.0 In-Reply-To: <20170519065331.27670-1-clabbe.montjoie@gmail.com> References: <20170519065331.27670-1-clabbe.montjoie@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170518_235611_343421_09D0107B X-CRM114-Status: UNSURE ( 9.88 ) 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/omap-sham.c b/drivers/crypto/omap-sham.c index d0b16e5e4ee5..1864a57caaa4 100644 --- a/drivers/crypto/omap-sham.c +++ b/drivers/crypto/omap-sham.c @@ -41,6 +41,7 @@ #include <crypto/algapi.h> #include <crypto/sha.h> #include <crypto/hash.h> +#include <crypto/hmac.h> #include <crypto/internal/hash.h> #define MD5_DIGEST_SIZE 16 @@ -1326,8 +1327,8 @@ static int omap_sham_setkey(struct crypto_ahash *tfm, const u8 *key, memcpy(bctx->opad, bctx->ipad, bs); for (i = 0; i < bs; i++) { - bctx->ipad[i] ^= 0x36; - bctx->opad[i] ^= 0x5c; + bctx->ipad[i] ^= HMAC_IPAD_VALUE; + bctx->opad[i] ^= HMAC_OPAD_VALUE; } }
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/omap-sham.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)