crypto: chacha20poly1305 - export CHACHAPOLY_IV_SIZE
authorCristian Stoica <cristian.stoica@nxp.com>
Thu, 8 Nov 2018 13:36:29 +0000 (15:36 +0200)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 16 Nov 2018 06:11:03 +0000 (14:11 +0800)
Move CHACHAPOLY_IV_SIZE to header file, so it can be reused.

Signed-off-by: Cristian Stoica <cristian.stoica@nxp.com>
Signed-off-by: Horia Geantă <horia.geanta@nxp.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
crypto/chacha20poly1305.c
include/crypto/chacha20.h

index 600afa99941fe07470b74f3c142b59716656df92..f9dd5453046a8ef326d500e9f3021d5a059d0173 100644 (file)
@@ -22,8 +22,6 @@
 
 #include "internal.h"
 
-#define CHACHAPOLY_IV_SIZE     12
-
 struct chachapoly_instance_ctx {
        struct crypto_skcipher_spawn chacha;
        struct crypto_ahash_spawn poly;
index f76302d99e2bedbdb0be35c202cd8a8b24c3a6a6..2d3129442a52d9ab090d8040405ad0cfd99d08de 100644 (file)
@@ -13,6 +13,7 @@
 #define CHACHA20_IV_SIZE       16
 #define CHACHA20_KEY_SIZE      32
 #define CHACHA20_BLOCK_SIZE    64
+#define CHACHAPOLY_IV_SIZE     12
 
 struct chacha20_ctx {
        u32 key[8];