diff options
author | Colin Watson <cjwatson@debian.org> | 2020-06-07 10:19:23 +0100 |
---|---|---|
committer | Colin Watson <cjwatson@debian.org> | 2020-06-07 10:19:23 +0100 |
commit | 202f5a676221c244cd450086c334c2b59f339e86 (patch) | |
tree | d2f90a3a9ce2b33485c271eab01a48f02ef6fb5a /cipher-chachapoly.h | |
parent | f0de78bd4f29fa688c5df116f3f9cd43543a76d0 (diff) | |
parent | 9ca7e9c861775dd6c6312bc8aaab687403d24676 (diff) |
Import openssh_8.3p1.orig.tar.gz
Diffstat (limited to 'cipher-chachapoly.h')
-rw-r--r-- | cipher-chachapoly.h | 13 |
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 | ||
27 | struct chachapoly_ctx { | 27 | struct chachapoly_ctx; |
28 | struct chacha_ctx main_ctx, header_ctx; | 28 | |
29 | }; | 29 | struct chachapoly_ctx *chachapoly_new(const u_char *key, u_int keylen) |
30 | __attribute__((__bounded__(__buffer__, 1, 2))); | ||
31 | void chachapoly_free(struct chachapoly_ctx *cpctx); | ||
30 | 32 | ||
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, | 33 | 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, | 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); |