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: 804316 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3xc3Hl2RLrz9sRm for ; Tue, 22 Aug 2017 18:14:27 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="gJwXGzCs"; dkim-atps=neutral Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 3xc3Hl1JgDzDqlw for ; Tue, 22 Aug 2017 18:14:27 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="gJwXGzCs"; dkim-atps=neutral X-Original-To: linuxppc-dev@lists.ozlabs.org Delivered-To: linuxppc-dev@lists.ozlabs.org Received: from mail-wr0-x241.google.com (mail-wr0-x241.google.com [IPv6:2a00:1450:400c:c0c::241]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 3xc3CK1c8ZzDqkh for ; Tue, 22 Aug 2017 18:10:37 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="gJwXGzCs"; dkim-atps=neutral Received: by mail-wr0-x241.google.com with SMTP id k10so8621880wre.5 for ; Tue, 22 Aug 2017 01:10:37 -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=hsnELcofxZuTncr6xU2WFwJsTxCyUD5HMSzIhSXMU1GZdjgnyhgRc51+Q3MslF5JPp 9QY/xCcOkh0G/T6toZ5D630V9/EfuSkh/RiHxCIgY3LKwzFJm40Sy7rTP4QDHd3Y8raQ tjqw2yUVy6G4ZUEnso8rcyFh3sOYjyXw7lKYF2guhUOqKqWPW0E7FEmy9IJhCJoJUyWt clN0f4fSSq9MC+ryHeohKbgDUKBGnrL1CeS7gJE0vc1/UcbgOrF+tsRh8Kws4Oi3EVNq RETRKeIJu7uNEzhIRDC1q3HU+xLJPLeBrFJrOtT2jvX6Xao/bQbsdUs1FCFp35V7tAKl j0Dg== X-Gm-Message-State: AHYfb5jDW9UgZ5GkQTNs7xF0lna1BQ7rG1PYEgEQnz5JwW0UsFxNF9m3 fWO0oK1NCbxMDw== 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-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Linux on PowerPC Developers Mail List 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 Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org Sender: "Linuxppc-dev" 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