Merge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/evalenti/linux...
[linux/fpc-iii.git] / include / crypto / chacha20.h
blob274bbaeeed0fcfc30aed66b0b785a7d7c6f60eb9
1 /*
2 * Common values for the ChaCha20 algorithm
3 */
5 #ifndef _CRYPTO_CHACHA20_H
6 #define _CRYPTO_CHACHA20_H
8 #include <linux/types.h>
9 #include <linux/crypto.h>
11 #define CHACHA20_IV_SIZE 16
12 #define CHACHA20_KEY_SIZE 32
13 #define CHACHA20_BLOCK_SIZE 64
15 struct chacha20_ctx {
16 u32 key[8];
19 void crypto_chacha20_init(u32 *state, struct chacha20_ctx *ctx, u8 *iv);
20 int crypto_chacha20_setkey(struct crypto_tfm *tfm, const u8 *key,
21 unsigned int keysize);
22 int crypto_chacha20_crypt(struct blkcipher_desc *desc, struct scatterlist *dst,
23 struct scatterlist *src, unsigned int nbytes);
25 #endif