From 0b06b4f61b497c7ad9869441f12ee287b65cde36 Mon Sep 17 00:00:00 2001 From: Jack Lloyd Date: Fri, 15 Apr 2016 00:08:04 -0400 Subject: Empty the key/tweak containers which is used to signal the key was set Fix exception message --- src/lib/block/threefish/threefish.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/lib/block/threefish/threefish.cpp b/src/lib/block/threefish/threefish.cpp index 958175bb8..c8e2aff85 100644 --- a/src/lib/block/threefish/threefish.cpp +++ b/src/lib/block/threefish/threefish.cpp @@ -221,7 +221,7 @@ void Threefish_512::decrypt_n(const byte in[], byte out[], size_t blocks) const void Threefish_512::set_tweak(const byte tweak[], size_t len) { if(len != 16) - throw Exception("Unsupported twofish tweak length"); + throw Exception("Threefish-512 requires 128 bit tweak"); m_T.resize(3); m_T[0] = load_le(tweak, 0); m_T[1] = load_le(tweak, 1); @@ -246,8 +246,8 @@ void Threefish_512::key_schedule(const byte key[], size_t) void Threefish_512::clear() { - zeroise(m_K); - zeroise(m_T); + zap(m_K); + zap(m_T); } } -- cgit v1.2.3