diff options
author | Colin Watson <cjwatson@debian.org> | 2014-03-20 00:32:39 +0000 |
---|---|---|
committer | Colin Watson <cjwatson@debian.org> | 2014-03-20 00:34:16 +0000 |
commit | 2ee2de47fd0f684f54218d31b4ec83930e69c18e (patch) | |
tree | 86848a7668424b392d48791a0e41e05f9df7b62b /cipher-chachapoly.c | |
parent | c9947303ad3c432b1cadfbeb1d95a7cd38662d66 (diff) | |
parent | 9cbb60f5e4932634db04c330c88abc49cc5567bd (diff) |
Merge 6.6p1.
* New upstream release (http://www.openssh.com/txt/release-6.6).
Diffstat (limited to 'cipher-chachapoly.c')
-rw-r--r-- | cipher-chachapoly.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/cipher-chachapoly.c b/cipher-chachapoly.c index 91b0830fd..251b94ec8 100644 --- a/cipher-chachapoly.c +++ b/cipher-chachapoly.c | |||
@@ -14,7 +14,7 @@ | |||
14 | * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | 14 | * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. |
15 | */ | 15 | */ |
16 | 16 | ||
17 | /* $OpenBSD: cipher-chachapoly.c,v 1.3 2013/12/15 21:42:35 djm Exp $ */ | 17 | /* $OpenBSD: cipher-chachapoly.c,v 1.4 2014/01/31 16:39:19 tedu Exp $ */ |
18 | 18 | ||
19 | #include "includes.h" | 19 | #include "includes.h" |
20 | 20 | ||
@@ -58,7 +58,7 @@ chachapoly_crypt(struct chachapoly_ctx *ctx, u_int seqnr, u_char *dest, | |||
58 | * Run ChaCha20 once to generate the Poly1305 key. The IV is the | 58 | * Run ChaCha20 once to generate the Poly1305 key. The IV is the |
59 | * packet sequence number. | 59 | * packet sequence number. |
60 | */ | 60 | */ |
61 | bzero(poly_key, sizeof(poly_key)); | 61 | memset(poly_key, 0, sizeof(poly_key)); |
62 | put_u64(seqbuf, seqnr); | 62 | put_u64(seqbuf, seqnr); |
63 | chacha_ivsetup(&ctx->main_ctx, seqbuf, NULL); | 63 | chacha_ivsetup(&ctx->main_ctx, seqbuf, NULL); |
64 | chacha_encrypt_bytes(&ctx->main_ctx, | 64 | chacha_encrypt_bytes(&ctx->main_ctx, |
@@ -90,9 +90,9 @@ chachapoly_crypt(struct chachapoly_ctx *ctx, u_int seqnr, u_char *dest, | |||
90 | r = 0; | 90 | r = 0; |
91 | 91 | ||
92 | out: | 92 | out: |
93 | bzero(expected_tag, sizeof(expected_tag)); | 93 | explicit_bzero(expected_tag, sizeof(expected_tag)); |
94 | bzero(seqbuf, sizeof(seqbuf)); | 94 | explicit_bzero(seqbuf, sizeof(seqbuf)); |
95 | bzero(poly_key, sizeof(poly_key)); | 95 | explicit_bzero(poly_key, sizeof(poly_key)); |
96 | return r; | 96 | return r; |
97 | } | 97 | } |
98 | 98 | ||