From 3e1c326819e44fceb5024abd9d0f0ec8f621c783 Mon Sep 17 00:00:00 2001 From: Will Childs-Klein Date: Thu, 5 Oct 2023 17:18:52 +0000 Subject: [PATCH] Revert "Add self check for SHA3/SHAKE" This reverts commit 172603960eb283106016488d0d1e98888864f80e. --- crypto/fipsmodule/self_check/self_check.c | 23 +---------------------- 1 file changed, 1 insertion(+), 22 deletions(-) diff --git a/crypto/fipsmodule/self_check/self_check.c b/crypto/fipsmodule/self_check/self_check.c index d43c6a16057..be564bded6e 100644 --- a/crypto/fipsmodule/self_check/self_check.c +++ b/crypto/fipsmodule/self_check/self_check.c @@ -881,26 +881,6 @@ static int boringssl_self_test_sha512(void) { "SHA-512 KAT"); } -static int boringssl_self_test_sha3(void) { - static const uint8_t kInput[16] = { - 0x21, 0x25, 0x12, 0xf8, 0xd2, 0xad, 0x83, 0x22, - 0x78, 0x1c, 0x6c, 0x4d, 0x69, 0xa9, 0xda, 0xa1, - }; - static const uint8_t kPlaintextSHA3_512[] = { - 0x9e, 0xc5, 0xfc, 0x63, 0x7e, 0xd8, 0xe4, 0x00, 0x88, 0xcf, 0x4a, 0xf9, - 0x42, 0xee, 0x01, 0xf2, 0x4c, 0x8d, 0xdf, 0xa8, 0x65, 0x90, 0xad, 0xb4, - 0x23, 0x21, 0x18, 0x94, 0x4d, 0x7d, 0xe3, 0xe9, 0xee, 0xc1, 0x4d, 0xe2, - 0xc2, 0xe9, 0x3c, 0x89, 0xf7, 0xe1, 0xa7, 0xed, 0xf1, 0xcc, 0x1e, 0x0c, - 0xf8, 0xae, 0xfc, 0xea, 0x4a, 0x30, 0xe6, 0x93, 0x8e, 0x99, 0x43, 0x2c, - 0xe3, 0x2a, 0x96, 0x4f, - }; - uint8_t output[SHA3_512_DIGEST_LENGTH]; - - SHA3_512(kInput, sizeof(kInput), output); - return check_test(kPlaintextSHA3_512, output, sizeof(kPlaintextSHA3_512), - "SHA3-512 KAT"); -} - int boringssl_self_test_hmac_sha256(void) { static const uint8_t kInput[16] = { 0xda, 0xd9, 0x12, 0x93, 0xdf, 0xcf, 0x2a, 0x7c, @@ -1088,8 +1068,7 @@ static int boringssl_self_test_fast(void) { } if (!boringssl_self_test_sha512() || - !boringssl_self_test_hkdf_sha256() || - !boringssl_self_test_sha3()) { + !boringssl_self_test_hkdf_sha256()) { goto err; }