diff options
author | Cristian Stoica <cristian.stoica@nxp.com> | 2018-11-08 08:36:29 -0500 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2018-11-16 01:11:03 -0500 |
commit | 193188e5512db5e84d2d9a7a6a157de651e78f3a (patch) | |
tree | c536ac4be8f0af4789bf7249d1df772cf2d008b8 | |
parent | c99d4a2454009d6fb51e03248fac7629c4d6a5ca (diff) |
crypto: chacha20poly1305 - export CHACHAPOLY_IV_SIZE
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>
-rw-r--r-- | crypto/chacha20poly1305.c | 2 | ||||
-rw-r--r-- | include/crypto/chacha20.h | 1 |
2 files changed, 1 insertions, 2 deletions
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 @@ | |||
22 | 22 | ||
23 | #include "internal.h" | 23 | #include "internal.h" |
24 | 24 | ||
25 | #define CHACHAPOLY_IV_SIZE 12 | ||
26 | |||
27 | struct chachapoly_instance_ctx { | 25 | struct chachapoly_instance_ctx { |
28 | struct crypto_skcipher_spawn chacha; | 26 | struct crypto_skcipher_spawn chacha; |
29 | struct crypto_ahash_spawn poly; | 27 | 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 @@ | |||
13 | #define CHACHA20_IV_SIZE 16 | 13 | #define CHACHA20_IV_SIZE 16 |
14 | #define CHACHA20_KEY_SIZE 32 | 14 | #define CHACHA20_KEY_SIZE 32 |
15 | #define CHACHA20_BLOCK_SIZE 64 | 15 | #define CHACHA20_BLOCK_SIZE 64 |
16 | #define CHACHAPOLY_IV_SIZE 12 | ||
16 | 17 | ||
17 | struct chacha20_ctx { | 18 | struct chacha20_ctx { |
18 | u32 key[8]; | 19 | u32 key[8]; |