From 435025d175e2b2d41a07f2531200d4a785ef0b18 Mon Sep 17 00:00:00 2001 From: Theo de Raadt Date: Tue, 11 Jan 2011 15:44:24 +0000 Subject: in AES_GMAC_Final(), explicitly clear the local buffer ok mikeb --- sys/crypto/gmac.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'sys/crypto/gmac.c') diff --git a/sys/crypto/gmac.c b/sys/crypto/gmac.c index dc85294850a..d90f2ceaf4a 100644 --- a/sys/crypto/gmac.c +++ b/sys/crypto/gmac.c @@ -1,4 +1,4 @@ -/* $OpenBSD: gmac.c,v 1.2 2010/11/08 10:27:50 mikeb Exp $ */ +/* $OpenBSD: gmac.c,v 1.3 2011/01/11 15:44:23 deraadt Exp $ */ /* * Copyright (c) 2010 Mike Belopuhov @@ -153,4 +153,5 @@ AES_GMAC_Final(uint8_t digest[GMAC_DIGEST_LEN], AES_GMAC_CTX *ctx) rijndaelEncrypt(ctx->K, ctx->rounds, ctx->J, keystream); for (i = 0; i < GMAC_DIGEST_LEN; i++) digest[i] = ctx->ghash.S[i] ^ keystream[i]; + explicit_bzero(keystream, sizeof(keystream)); } -- cgit v1.2.3