6f0cc6015c434fb7d66473a667be39fececa9047
[openwrt/openwrt.git] / target / linux / apm821xx / patches-4.14 / 010-crypto-gcm-add-GCM-IV-size-constant.patch
1 From ef780324592dd639e4bfbc5b9bf8934b234b7c99 Mon Sep 17 00:00:00 2001
2 From: Corentin LABBE <clabbe.montjoie@gmail.com>
3 Date: Tue, 22 Aug 2017 10:08:08 +0200
4 Subject: [PATCH] crypto: gcm - add GCM IV size constant
5
6 Many GCM users use directly GCM IV size instead of using some constant.
7
8 This patch add all IV size constant used by GCM.
9
10 Signed-off-by: Corentin Labbe <clabbe.montjoie@gmail.com>
11 Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
12 ---
13 include/crypto/gcm.h | 8 ++++++++
14 1 file changed, 8 insertions(+)
15 create mode 100644 include/crypto/gcm.h
16
17 --- /dev/null
18 +++ b/include/crypto/gcm.h
19 @@ -0,0 +1,8 @@
20 +#ifndef _CRYPTO_GCM_H
21 +#define _CRYPTO_GCM_H
22 +
23 +#define GCM_AES_IV_SIZE 12
24 +#define GCM_RFC4106_IV_SIZE 8
25 +#define GCM_RFC4543_IV_SIZE 8
26 +
27 +#endif