Skip to content

Commit 193188e

Browse files
Cristian Stoicaherbertx
authored andcommitted
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>
1 parent c99d4a2 commit 193188e

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

crypto/chacha20poly1305.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,6 @@
2222

2323
#include "internal.h"
2424

25-
#define CHACHAPOLY_IV_SIZE 12
26-
2725
struct chachapoly_instance_ctx {
2826
struct crypto_skcipher_spawn chacha;
2927
struct crypto_ahash_spawn poly;

include/crypto/chacha20.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
#define CHACHA20_IV_SIZE 16
1414
#define CHACHA20_KEY_SIZE 32
1515
#define CHACHA20_BLOCK_SIZE 64
16+
#define CHACHAPOLY_IV_SIZE 12
1617

1718
struct chacha20_ctx {
1819
u32 key[8];

0 commit comments

Comments
 (0)