diff options
author | Mike Belopuhov <mikeb@cvs.openbsd.org> | 2011-01-12 16:58:24 +0000 |
---|---|---|
committer | Mike Belopuhov <mikeb@cvs.openbsd.org> | 2011-01-12 16:58:24 +0000 |
commit | 3ae15e5550bf0e2bde6a24d51eb50de275b9f1ab (patch) | |
tree | 1f3cc780e46ad89ebd1c3c2d5a90c1e62ddf69d1 /sys/crypto | |
parent | c323393d8ae534b15db718b01dd31daff01ba33b (diff) |
cleanup aes-ctr keystream after use; ok deraadt
Diffstat (limited to 'sys/crypto')
-rw-r--r-- | sys/crypto/xform.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/crypto/xform.c b/sys/crypto/xform.c index f35a2b8ed80..59c128ac7e3 100644 --- a/sys/crypto/xform.c +++ b/sys/crypto/xform.c @@ -1,4 +1,4 @@ -/* $OpenBSD: xform.c,v 1.41 2011/01/11 15:42:05 deraadt Exp $ */ +/* $OpenBSD: xform.c,v 1.42 2011/01/12 16:58:23 mikeb Exp $ */ /* * The authors of this code are John Ioannidis (ji@tla.org), * Angelos D. Keromytis (kermit@csd.uch.gr), @@ -589,6 +589,7 @@ aes_ctr_crypt(caddr_t key, u_int8_t *data) rijndaelEncrypt(ctx->ac_ek, ctx->ac_nr, ctx->ac_block, keystream); for (i = 0; i < AESCTR_BLOCKSIZE; i++) data[i] ^= keystream[i]; + explicit_bzero(keystream, sizeof(keystream)); } int |