aboutsummaryrefslogtreecommitdiffstats
path: root/src/tests/test_mac.cpp
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2017-10-13 12:08:30 -0400
committerJack Lloyd <[email protected]>2017-10-13 12:16:39 -0400
commit577828a93755549f0e9d8413488e3e4485c67263 (patch)
treedbb1d6284914e0aa89212bfd33016e1a1a2c45c5 /src/tests/test_mac.cpp
parent742420b4b631d6d9139fe5f63ca5650f4fb56b9d (diff)
Optimize GCM
By allowing multiple blocks for clmul, slight speedup there though still far behind optimum. Precompute a table of multiples of H, 3-4x faster on systems without clmul (and still no secret indexes). Refactor GMAC to not derive from GHASH
Diffstat (limited to 'src/tests/test_mac.cpp')
-rw-r--r--src/tests/test_mac.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/tests/test_mac.cpp b/src/tests/test_mac.cpp
index 471a15fed..2792aeb3e 100644
--- a/src/tests/test_mac.cpp
+++ b/src/tests/test_mac.cpp
@@ -68,6 +68,7 @@ class Message_Auth_Tests final : public Text_Based_Test
// Test to make sure clear() resets what we need it to
mac->set_key(key);
+ mac->start(iv);
mac->update("some discarded input");
mac->clear();
@@ -81,6 +82,7 @@ class Message_Auth_Tests final : public Text_Based_Test
result.confirm("Clone has different pointer", mac.get() != clone.get());
result.test_eq("Clone has same name", mac->name(), clone->name());
clone->set_key(key);
+ clone->start(iv);
clone->update(Test::rng().random_vec(32));
result.test_eq(provider + " correct mac", mac->verify_mac(expected.data(), expected.size()), true);