From 577828a93755549f0e9d8413488e3e4485c67263 Mon Sep 17 00:00:00 2001 From: Jack Lloyd Date: Fri, 13 Oct 2017 12:08:30 -0400 Subject: 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 --- src/tests/test_mac.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/tests/test_mac.cpp') 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); -- cgit v1.2.3