aboutsummaryrefslogtreecommitdiffstats
path: root/src/block/aes_ssse3/aes_ssse3.cpp
diff options
context:
space:
mode:
authorlloyd <[email protected]>2012-11-29 18:58:54 +0000
committerlloyd <[email protected]>2012-11-29 18:58:54 +0000
commit12c128c1fbb483ae9042b47fc544adf0e55d0693 (patch)
tree46aa39dcfb055c84778fa842a2d66249f6d175c8 /src/block/aes_ssse3/aes_ssse3.cpp
parent2d8dff7079d4a8eabd848bd0e88b38a2112b333e (diff)
Add new helper zap which zeros a vector, clears it, and then calls
shrink_to_fit to actually deallocate memory.
Diffstat (limited to 'src/block/aes_ssse3/aes_ssse3.cpp')
-rw-r--r--src/block/aes_ssse3/aes_ssse3.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/block/aes_ssse3/aes_ssse3.cpp b/src/block/aes_ssse3/aes_ssse3.cpp
index 648f96d67..476b004bb 100644
--- a/src/block/aes_ssse3/aes_ssse3.cpp
+++ b/src/block/aes_ssse3/aes_ssse3.cpp
@@ -406,6 +406,12 @@ void AES_128_SSSE3::key_schedule(const byte keyb[], size_t)
_mm_storeu_si128(DK_mm, aes_schedule_mangle_last_dec(key));
}
+void AES_128_SSSE3::clear()
+ {
+ zap(EK);
+ zap(DK);
+ }
+
/*
* AES-192 Encryption
*/
@@ -507,6 +513,11 @@ void AES_192_SSSE3::key_schedule(const byte keyb[], size_t)
}
}
+void AES_192_SSSE3::clear()
+ {
+ zap(EK);
+ zap(DK);
+ }
/*
* AES-256 Encryption
@@ -588,4 +599,10 @@ void AES_256_SSSE3::key_schedule(const byte keyb[], size_t)
_mm_storeu_si128(DK_mm + 0, aes_schedule_mangle_last_dec(key2));
}
+void AES_256_SSSE3::clear()
+ {
+ zap(EK);
+ zap(DK);
+ }
+
}