summaryrefslogtreecommitdiff
path: root/cipher-chachapoly.h
diff options
context:
space:
mode:
authorColin Watson <cjwatson@debian.org>2020-06-07 10:19:23 +0100
committerColin Watson <cjwatson@debian.org>2020-06-07 10:19:23 +0100
commit202f5a676221c244cd450086c334c2b59f339e86 (patch)
treed2f90a3a9ce2b33485c271eab01a48f02ef6fb5a /cipher-chachapoly.h
parentf0de78bd4f29fa688c5df116f3f9cd43543a76d0 (diff)
parent9ca7e9c861775dd6c6312bc8aaab687403d24676 (diff)
Import openssh_8.3p1.orig.tar.gz
Diffstat (limited to 'cipher-chachapoly.h')
-rw-r--r--cipher-chachapoly.h13
1 files changed, 6 insertions, 7 deletions
diff --git a/cipher-chachapoly.h b/cipher-chachapoly.h
index b7072be7d..026d2de93 100644
--- a/cipher-chachapoly.h
+++ b/cipher-chachapoly.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: cipher-chachapoly.h,v 1.4 2014/06/24 01:13:21 djm Exp $ */ 1/* $OpenBSD: cipher-chachapoly.h,v 1.5 2020/04/03 04:27:03 djm Exp $ */
2 2
3/* 3/*
4 * Copyright (c) Damien Miller 2013 <djm@mindrot.org> 4 * Copyright (c) Damien Miller 2013 <djm@mindrot.org>
@@ -24,13 +24,12 @@
24 24
25#define CHACHA_KEYLEN 32 /* Only 256 bit keys used here */ 25#define CHACHA_KEYLEN 32 /* Only 256 bit keys used here */
26 26
27struct chachapoly_ctx { 27struct chachapoly_ctx;
28 struct chacha_ctx main_ctx, header_ctx; 28
29}; 29struct chachapoly_ctx *chachapoly_new(const u_char *key, u_int keylen)
30 __attribute__((__bounded__(__buffer__, 1, 2)));
31void chachapoly_free(struct chachapoly_ctx *cpctx);
30 32
31int chachapoly_init(struct chachapoly_ctx *cpctx,
32 const u_char *key, u_int keylen)
33 __attribute__((__bounded__(__buffer__, 2, 3)));
34int chachapoly_crypt(struct chachapoly_ctx *cpctx, u_int seqnr, 33int 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, 34 u_char *dest, const u_char *src, u_int len, u_int aadlen, u_int authlen,
36 int do_encrypt); 35 int do_encrypt);