summaryrefslogtreecommitdiffstats
path: root/crypto/chacha20poly1305.c
diff options
context:
space:
mode:
authorMartin Willi <martin@strongswan.org>2015-07-16 19:14:00 +0200
committerHerbert Xu <herbert@gondor.apana.org.au>2015-07-17 21:20:21 +0800
commit31d7247da57226e847f0f102a10c27c0722c429b (patch)
tree3ca25c75fc443d974213e845d5999fd41b578091 /crypto/chacha20poly1305.c
parent2dce063a31ae6cbaf39964663fc59d10bef38d15 (diff)
downloadlinux-stable-31d7247da57226e847f0f102a10c27c0722c429b.tar.gz
linux-stable-31d7247da57226e847f0f102a10c27c0722c429b.tar.bz2
linux-stable-31d7247da57226e847f0f102a10c27c0722c429b.zip
crypto: chacha20 - Export common ChaCha20 helpers
As architecture specific drivers need a software fallback, export a ChaCha20 en-/decryption function together with some helpers in a header file. Signed-off-by: Martin Willi <martin@strongswan.org> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'crypto/chacha20poly1305.c')
-rw-r--r--crypto/chacha20poly1305.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/crypto/chacha20poly1305.c b/crypto/chacha20poly1305.c
index 86260937b0f3..410554d3a1ff 100644
--- a/crypto/chacha20poly1305.c
+++ b/crypto/chacha20poly1305.c
@@ -13,6 +13,7 @@
#include <crypto/internal/hash.h>
#include <crypto/internal/skcipher.h>
#include <crypto/scatterwalk.h>
+#include <crypto/chacha20.h>
#include <linux/err.h>
#include <linux/init.h>
#include <linux/kernel.h>
@@ -23,8 +24,6 @@
#define POLY1305_BLOCK_SIZE 16
#define POLY1305_DIGEST_SIZE 16
#define POLY1305_KEY_SIZE 32
-#define CHACHA20_KEY_SIZE 32
-#define CHACHA20_IV_SIZE 16
#define CHACHAPOLY_IV_SIZE 12
struct chachapoly_instance_ctx {