VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Crypto/Aeskey.c
diff options
context:
space:
mode:
authorHanno Böck <hanno@gentoo.org>2019-12-09 17:45:35 +0100
committerMounir IDRASSI <mounir.idrassi@idrix.fr>2019-12-09 17:45:35 +0100
commite6aae8bd71c3a8e96bb6105693f90f563b0688b3 (patch)
treeeddfa9ed1ea1b9d5d17d0d5297c47108ef5db27e /src/Crypto/Aeskey.c
parent0364a36f84b2a08c690ec008d4cbb160bdf27a67 (diff)
downloadVeraCrypt-e6aae8bd71c3a8e96bb6105693f90f563b0688b3.tar.gz
VeraCrypt-e6aae8bd71c3a8e96bb6105693f90f563b0688b3.zip
Add burn calls for temporary ss variable (#569)
Diffstat (limited to 'src/Crypto/Aeskey.c')
-rw-r--r--src/Crypto/Aeskey.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/Crypto/Aeskey.c b/src/Crypto/Aeskey.c
index c9ab0269..9b7bfd18 100644
--- a/src/Crypto/Aeskey.c
+++ b/src/Crypto/Aeskey.c
@@ -27,6 +27,7 @@
#include "Aesopt.h"
#include "Aestab.h"
+#include "Common/Tcdefs.h"
#ifdef USE_VIA_ACE_IF_PRESENT
# include "aes_via_ace.h"
@@ -95,6 +96,8 @@ AES_RETURN aes_encrypt_key128(const unsigned char *key, aes_encrypt_ctx cx[1])
cx->inf.b[1] = 0xff;
#endif
+ burn(ss, sizeof(ss));
+
#if defined( AES_ERR_CHK )
return EXIT_SUCCESS;
#endif
@@ -147,6 +150,8 @@ AES_RETURN aes_encrypt_key192(const unsigned char *key, aes_encrypt_ctx cx[1])
cx->inf.b[1] = 0xff;
#endif
+ burn(ss, sizeof(ss));
+
#if defined( AES_ERR_CHK )
return EXIT_SUCCESS;
#endif
@@ -202,6 +207,8 @@ AES_RETURN aes_encrypt_key256(const unsigned char *key, aes_encrypt_ctx cx[1])
cx->inf.b[1] = 0xff;
#endif
+ burn(ss, sizeof(ss));
+
#if defined( AES_ERR_CHK )
return EXIT_SUCCESS;
#endif
@@ -352,6 +359,8 @@ AES_RETURN aes_decrypt_key128(const unsigned char *key, aes_decrypt_ctx cx[1])
cx->inf.b[1] = 0xff;
#endif
+ burn(ss, sizeof(ss));
+
#if defined( AES_ERR_CHK )
return EXIT_SUCCESS;
#endif
@@ -439,6 +448,8 @@ AES_RETURN aes_decrypt_key192(const unsigned char *key, aes_decrypt_ctx cx[1])
cx->inf.b[1] = 0xff;
#endif
+ burn(ss, sizeof(ss));
+
#if defined( AES_ERR_CHK )
return EXIT_SUCCESS;
#endif
@@ -538,6 +549,8 @@ AES_RETURN aes_decrypt_key256(const unsigned char *key, aes_decrypt_ctx cx[1])
cx->inf.b[1] = 0xff;
#endif
+ burn(ss, sizeof(ss));
+
#if defined( AES_ERR_CHK )
return EXIT_SUCCESS;
#endif