From patchwork Tue Aug 22 08:08:08 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Corentin Labbe X-Patchwork-Id: 9914497 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 5FC31600C5 for ; Tue, 22 Aug 2017 08:14:02 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 69FDE287EC for ; Tue, 22 Aug 2017 08:14:02 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5E7A52881A; Tue, 22 Aug 2017 08:14:02 +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=-2.6 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, DKIM_VALID, FREEMAIL_FROM, RCVD_IN_DNSWL_LOW 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 0E38F287EC for ; Tue, 22 Aug 2017 08:14:02 +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=oBwyHC194f0WY3RQxiMwoUd3uUqAA8TwrtP/cuNnE2g=; b=PDdPGLz4gTiUIjA7hEY1VTjgu6 VVJIc0ndnG5sqrUXznh9BwfopaPHm9BU2RCxPoqMmxdGBGeUAVkKXLv2wLvlYHE9Zk+ReRIL4xCY5 rhLGCWTLij09YXb13vaGjy73UftK/wq3BiHeHW6lYDQHME8Gqb7AM769zekgZNTmvfBfE3u+CgcGW zSG7oEOeC0659kmuUhmCjbziqnl7wDkfWmfPKpTL/oKIEkMco+w9hlleN8X1lQXiH6/8rchvb1q0w ZSJcsiWbmSKcOllbmjyWQfZuPsiRw2ls0L7MRHTs8cECBPBaNIBuLprGjG0ndGttuhxbwukdW/GaS OeO3PdnA==; 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 1dk4K0-0004rg-WD; Tue, 22 Aug 2017 08:14:01 +0000 Received: from mail-wr0-x243.google.com ([2a00:1450:400c:c0c::243]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1dk4H2-0001LW-2i; Tue, 22 Aug 2017 08:11:09 +0000 Received: by mail-wr0-x243.google.com with SMTP id z91so21508901wrc.4; Tue, 22 Aug 2017 01:10:35 -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=KfnsgnQPZoVbbM31eAFe9dzWGS/AkJCTUD2wlqcFjUM=; b=gJwXGzCs4bgOihDBYHgR/sWFby5ccXchpEgryGbZzwArFniiXhMyY7vtuGCNAXdbAD jBInnJith8ShQEC7BUUVSz5Es6slGKgBeepGWJyseV3S7g1/3QAYuHLwZEhqjwed7R29 ffJMG6XvLNZbT0rmwdpEtB3kNBXHWKQVhZRmfUgje581tzqgwbFC/kGqd98xs3vrm8py EcOZ/Tovr4P/4CfW5Et2vYMEC6vEw121/61Mr9EePh5w/6QSntxzNCh0Raezi4kVcdet 1TV556X2gYpDTxHGKBrBOwYmtXwza4TkoBOK8F5digDgzWuHadnIRsQQen3cmOK2Z8Ih doTw== 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=KfnsgnQPZoVbbM31eAFe9dzWGS/AkJCTUD2wlqcFjUM=; b=oo2duiyWdI0yYBlZarkg0zeVPGxiryd8zjhMkmlaVeVHAVd74aQxQaD77kUi4bwLOo C0T1d6Z5scCsEdhNUBHWV4k7utroISaD/f1+A2I5zwm3pZFlbxZMdwjFD1DyMQ55PnLQ T9Io2i3UijZGZ5rrenk45AxnCkODbzC1RLdGHNG8JMJqpBHsiP5IxevBD4BsnrRumQER 3X7EAE/aLMNv1NqaVCtLIls2kcf+D2vr/VT9auZ3W8U2q1UouCxN//QIq5vmqWi7vYHK 70Unw1nV/qbU4S3lzaqF3aaPPem0XBJ5umOXCx4aYe+B4gvWTQOGbxMZX7lxWHk0z+l7 P7WA== X-Gm-Message-State: AHYfb5hozF2ab2e+LHXam50qpK/Rk4Scd/+VQ3wWNQLpFiQlBPbTEnVj zwjXBPVWPcheWw== X-Received: by 10.28.187.195 with SMTP id l186mr4203560wmf.111.1503389434428; Tue, 22 Aug 2017 01:10:34 -0700 (PDT) Received: from Red.local (LFbn1-1-65-78.w90-118.abo.wanadoo.fr. [90.118.156.78]) by smtp.googlemail.com with ESMTPSA id e21sm10778796wme.17.2017.08.22.01.10.32 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 22 Aug 2017 01:10:33 -0700 (PDT) From: Corentin Labbe To: herbert@gondor.apana.org.au, davem@davemloft.net, tglx@linutronix.de, mingo@redhat.com, hpa@zytor.com, x86@kernel.org, horia.geanta@nxp.com, dan.douglass@nxp.com, thomas.lendacky@amd.com, gary.hook@amd.com, harsh@chelsio.com, matthias.bgg@gmail.com, leosilva@linux.vnet.ibm.com, pfsmorigo@linux.vnet.ibm.com, benh@kernel.crashing.org, paulus@samba.org, mpe@ellerman.id.au Subject: [PATCH 01/11] crypto: gcm - add GCM IV size constant Date: Tue, 22 Aug 2017 10:08:08 +0200 Message-Id: <20170822080818.12486-2-clabbe.montjoie@gmail.com> X-Mailer: git-send-email 2.13.5 In-Reply-To: <20170822080818.12486-1-clabbe.montjoie@gmail.com> References: <20170822080818.12486-1-clabbe.montjoie@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170822_011056_691710_03BC6079 X-CRM114-Status: UNSURE ( 9.90 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-kernel@vger.kernel.org, Corentin Labbe , linux-crypto@vger.kernel.org, linux-mediatek@lists.infradead.org, linuxppc-dev@lists.ozlabs.org, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+patchwork-linux-mediatek=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Many GCM users use directly GCM IV size instead of using some constant. This patch add all IV size constant used by GCM. Signed-off-by: Corentin Labbe --- include/crypto/gcm.h | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 include/crypto/gcm.h diff --git a/include/crypto/gcm.h b/include/crypto/gcm.h new file mode 100644 index 000000000000..c50e057ea17e --- /dev/null +++ b/include/crypto/gcm.h @@ -0,0 +1,8 @@ +#ifndef _CRYPTO_GCM_H +#define _CRYPTO_GCM_H + +#define GCM_AES_IV_SIZE 12 +#define GCM_RFC4106_IV_SIZE 8 +#define GCM_RFC4543_IV_SIZE 8 + +#endif