From patchwork Fri May 19 06:53:28 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Corentin Labbe X-Patchwork-Id: 9735925 X-Patchwork-Delegate: herbert@gondor.apana.org.au Return-Path: 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 3CE5C6042E for ; Fri, 19 May 2017 06:57:07 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 36AE4288A9 for ; Fri, 19 May 2017 06:57:07 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2A53C288AD; Fri, 19 May 2017 06:57:07 +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=-6.5 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C8580288A6 for ; Fri, 19 May 2017 06:57:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752558AbdESG5C (ORCPT ); Fri, 19 May 2017 02:57:02 -0400 Received: from mail-wm0-f68.google.com ([74.125.82.68]:36255 "EHLO mail-wm0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752338AbdESGzy (ORCPT ); Fri, 19 May 2017 02:55:54 -0400 Received: by mail-wm0-f68.google.com with SMTP id k15so14862995wmh.3; 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=FOMWrVPzANJ9HZTyRh7psUI/tuO/zZAvA2TKk0LUNtz+PleaTMOY9gBx5y5goOuFYi LSVS+kU985R0T9IFRTETg6J1gaIDpCKm8+fngMhccUbRvaethPwIZ6NXEi70zMBprjgi mbMCQto9SiPWNkaHRU/hv6QZsHP156aBkAB5cWcH7LJ9e/G+0wZ0/rEIofNhMmDAV3co DnPs8rLSnLPNCXU4uCekm/dhs1Ti5B/vt3DAuzt0TBW2gMwbZMcHUh2f5EpFZA70iTek 56yUaCFIDljmsBVzktpy7sg9yz8AgKc8O1VJGMop7S0SrPeJzHXIdwBorqyIY3o4kIP9 W8aQ== X-Gm-Message-State: AODbwcA5Z4FlY3tBFH4Je950rT6fa2UQc49fsPJLIHU7Eyp30OwrF2JV QHNz3TowNQorTg== 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 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 Cc: linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, qat-linux@intel.com, Corentin Labbe 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> Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This patch simply replace all occurrence of HMAC IPAD/OPAD value by their define. Signed-off-by: Corentin Labbe --- drivers/crypto/omap-sham.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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 #include #include +#include #include #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; } }