Skip to content

Commit 497f86b

Browse files
committed
LibCrypto: Remove unused GHash class
1 parent 4ba4b62 commit 497f86b

File tree

4 files changed

+0
-208
lines changed

4 files changed

+0
-208
lines changed

Libraries/LibCrypto/Authentication/GHash.cpp

Lines changed: 0 additions & 123 deletions
This file was deleted.

Libraries/LibCrypto/Authentication/GHash.h

Lines changed: 0 additions & 58 deletions
This file was deleted.

Libraries/LibCrypto/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ set(SOURCES
55
ASN1/ASN1.cpp
66
ASN1/DER.cpp
77
ASN1/PEM.cpp
8-
Authentication/GHash.cpp
98
Authentication/HMAC.cpp
109
BigFraction/BigFraction.cpp
1110
BigInt/Algorithms/BitwiseOperations.cpp

Tests/LibCrypto/TestHash.cpp

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
* SPDX-License-Identifier: BSD-2-Clause
55
*/
66

7-
#include <LibCrypto/Authentication/GHash.h>
87
#include <LibCrypto/Authentication/HMAC.h>
98
#include <LibCrypto/Hash/BLAKE2b.h>
109
#include <LibCrypto/Hash/MD5.h>
@@ -300,28 +299,3 @@ TEST_CASE(test_SHA512_hash_empty_string)
300299
EXPECT(memcmp(result, digest.data, Crypto::Hash::SHA512::digest_size()) == 0);
301300
}
302301

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

Comments
 (0)