From 3ae15e5550bf0e2bde6a24d51eb50de275b9f1ab Mon Sep 17 00:00:00 2001 From: Mike Belopuhov Date: Wed, 12 Jan 2011 16:58:24 +0000 Subject: cleanup aes-ctr keystream after use; ok deraadt --- sys/crypto/xform.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'sys/crypto') 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 -- cgit v1.2.3