Skip to content

Commit

Permalink
Revert "Add self check for SHA3/SHAKE"
Browse files Browse the repository at this point in the history
This reverts commit 1726039.
  • Loading branch information
WillChilds-Klein committed Oct 6, 2023
1 parent e881478 commit 3e1c326
Showing 1 changed file with 1 addition and 22 deletions.
23 changes: 1 addition & 22 deletions crypto/fipsmodule/self_check/self_check.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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;
}

Expand Down

0 comments on commit 3e1c326

Please sign in to comment.