1 /* $OpenBSD: chacha.h,v 1.4 2016/08/27 04:04:56 guenther Exp $ */
4 chacha-merged.c version 20080118
14 #include <sys/types.h>
15 #include <crypto/chacha20/_chacha.h>
17 #define CHACHA_MINKEYLEN 16
18 #define CHACHA_NONCELEN 8
19 #define CHACHA_CTRLEN 8
20 #define CHACHA_STATELEN (CHACHA_NONCELEN+CHACHA_CTRLEN)
21 #define CHACHA_BLOCKLEN 64
29 LOCAL void chacha_keysetup(struct chacha_ctx *x, const u_char *k, u_int kbits);
30 LOCAL void chacha_ivsetup(struct chacha_ctx *x, const u_char *iv, const u_char *ctr);
31 LOCAL void chacha_encrypt_bytes(struct chacha_ctx *x, const u_char *m,
32 u_char *c, u_int bytes);