|
4 | 4 | * SPDX-License-Identifier: BSD-2-Clause |
5 | 5 | */ |
6 | 6 |
|
7 | | -#include <LibCrypto/Authentication/GHash.h> |
8 | 7 | #include <LibCrypto/Authentication/HMAC.h> |
9 | 8 | #include <LibCrypto/Hash/BLAKE2b.h> |
10 | 9 | #include <LibCrypto/Hash/MD5.h> |
@@ -300,28 +299,3 @@ TEST_CASE(test_SHA512_hash_empty_string) |
300 | 299 | EXPECT(memcmp(result, digest.data, Crypto::Hash::SHA512::digest_size()) == 0); |
301 | 300 | } |
302 | 301 |
|
303 | | -TEST_CASE(test_ghash_test_name) |
304 | | -{ |
305 | | - Crypto::Authentication::GHash ghash("WellHelloFriends"); |
306 | | - EXPECT_EQ(ghash.class_name(), "GHash"); |
307 | | -} |
308 | | - |
309 | | -TEST_CASE(test_ghash_galois_field_multiply) |
310 | | -{ |
311 | | - u32 x[4] { 0x42831ec2, 0x21777424, 0x4b7221b7, 0x84d0d49c }, |
312 | | - y[4] { 0xb83b5337, 0x08bf535d, 0x0aa6e529, 0x80d53b78 }, z[4] { 0, 0, 0, 0 }; |
313 | | - static constexpr u32 result[4] { 0x59ed3f2b, 0xb1a0aaa0, 0x7c9f56c6, 0xa504647b }; |
314 | | - |
315 | | - Crypto::Authentication::galois_multiply(z, x, y); |
316 | | - EXPECT(memcmp(result, z, 4 * sizeof(u32)) == 0); |
317 | | -} |
318 | | - |
319 | | -TEST_CASE(test_ghash_galois_field_multiply2) |
320 | | -{ |
321 | | - u32 x[4] { 59300558, 1622582162, 4079534777, 1907555960 }, |
322 | | - y[4] { 1726565332, 4018809915, 2286746201, 3392416558 }, z[4]; |
323 | | - constexpr static u32 result[4] { 1580123974, 2440061576, 746958952, 1398005431 }; |
324 | | - |
325 | | - Crypto::Authentication::galois_multiply(z, x, y); |
326 | | - EXPECT(memcmp(result, z, 4 * sizeof(u32)) == 0); |
327 | | -} |
0 commit comments