aboutsummaryrefslogtreecommitdiffstats
path: root/include/crypto/chacha20.h
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2018-09-11 20:36:50 -0600
committerJason A. Donenfeld <Jason@zx2c4.com>2018-09-18 05:49:59 +0200
commit7f326fbd79dc018aa97fa785910bc052f35dd999 (patch)
tree1c3954f772ecc3f951d79b1e9a761c27f0e31f60 /include/crypto/chacha20.h
parentcrypto: port Poly1305 to Zinc (diff)
downloadlinux-dev-7f326fbd79dc018aa97fa785910bc052f35dd999.tar.xz
linux-dev-7f326fbd79dc018aa97fa785910bc052f35dd999.zip
crypto: port ChaCha20 to Zinc
Now that ChaCha20 is in Zinc, we can have the crypto API code simply call into it. The crypto API expects to have a stored key per instance and independent nonces, so we follow suite and store the key and initialize the nonce independently. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com> Cc: Samuel Neves <sneves@dei.uc.pt> Cc: Andy Lutomirski <luto@kernel.org> Cc: Greg KH <gregkh@linuxfoundation.org> Cc: Jean-Philippe Aumasson <jeanphilippe.aumasson@gmail.com> Cc: Eric Biggers <ebiggers@google.com>
Diffstat (limited to 'include/crypto/chacha20.h')
-rw-r--r--include/crypto/chacha20.h12
1 files changed, 0 insertions, 12 deletions
diff --git a/include/crypto/chacha20.h b/include/crypto/chacha20.h
index b83d66073db0..3b92f58f3891 100644
--- a/include/crypto/chacha20.h
+++ b/include/crypto/chacha20.h
@@ -6,23 +6,11 @@
#ifndef _CRYPTO_CHACHA20_H
#define _CRYPTO_CHACHA20_H
-#include <crypto/skcipher.h>
-#include <linux/types.h>
-#include <linux/crypto.h>
-
#define CHACHA20_IV_SIZE 16
#define CHACHA20_KEY_SIZE 32
#define CHACHA20_BLOCK_SIZE 64
#define CHACHA20_BLOCK_WORDS (CHACHA20_BLOCK_SIZE / sizeof(u32))
-struct chacha20_ctx {
- u32 key[8];
-};
-
void chacha20_block(u32 *state, u32 *stream);
-void crypto_chacha20_init(u32 *state, struct chacha20_ctx *ctx, u8 *iv);
-int crypto_chacha20_setkey(struct crypto_skcipher *tfm, const u8 *key,
- unsigned int keysize);
-int crypto_chacha20_crypt(struct skcipher_request *req);
#endif