From: Cristian Stoica Date: Thu, 8 Nov 2018 13:36:29 +0000 (+0200) Subject: crypto: chacha20poly1305 - export CHACHAPOLY_IV_SIZE X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=193188e5512db5e84d2d9a7a6a157de651e78f3a;p=openwrt%2Fstaging%2Fblogic.git crypto: chacha20poly1305 - export CHACHAPOLY_IV_SIZE Move CHACHAPOLY_IV_SIZE to header file, so it can be reused. Signed-off-by: Cristian Stoica Signed-off-by: Horia Geantă Signed-off-by: Herbert Xu --- diff --git a/crypto/chacha20poly1305.c b/crypto/chacha20poly1305.c index 600afa99941f..f9dd5453046a 100644 --- a/crypto/chacha20poly1305.c +++ b/crypto/chacha20poly1305.c @@ -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; diff --git a/include/crypto/chacha20.h b/include/crypto/chacha20.h index f76302d99e2b..2d3129442a52 100644 --- a/include/crypto/chacha20.h +++ b/include/crypto/chacha20.h @@ -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];