18 #ifndef CHACHA_POLY_AEAD_H 19 #define CHACHA_POLY_AEAD_H 21 #include <sys/types.h> 25 #define CHACHA_KEYLEN 32 27 struct chachapoly_ctx {
28 struct chacha_ctx main_ctx, header_ctx;
31 int chachapoly_init(
struct chachapoly_ctx *cpctx,
32 const u_char *key, u_int keylen)
33 __attribute__((__bounded__(__buffer__, 2, 3)));
34 int chachapoly_crypt(
struct chachapoly_ctx *cpctx, u_int seqnr,
35 u_char *dest,
const u_char *src, u_int len, u_int aadlen, u_int authlen,
37 int chachapoly_get_length(
struct chachapoly_ctx *cpctx,
38 u_int *plenp, u_int seqnr,
const u_char *cp, u_int len)
39 __attribute__((__bounded__(__buffer__, 4, 5)));