Add SHA3 support
This is required to run SHA3 tests otherwise we get an error of unknown
algorithm.
Change-Id: I085da2b6757ba1f452f33abc7f1bafc4a404e025
Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/52926
Reviewed-by: Adam Langley <agl@google.com>
Reviewed-by: Corie Pressley <cpressley@google.com>
diff --git a/util/fipstools/acvp/acvptool/subprocess/subprocess.go b/util/fipstools/acvp/acvptool/subprocess/subprocess.go
index c5003e1..5f7a273 100644
--- a/util/fipstools/acvp/acvptool/subprocess/subprocess.go
+++ b/util/fipstools/acvp/acvptool/subprocess/subprocess.go
@@ -77,6 +77,10 @@
"SHA2-384": &hashPrimitive{"SHA2-384", 48},
"SHA2-512": &hashPrimitive{"SHA2-512", 64},
"SHA2-512/256": &hashPrimitive{"SHA2-512/256", 32},
+ "SHA3-224": &hashPrimitive{"SHA3-224", 28},
+ "SHA3-256": &hashPrimitive{"SHA3-256", 32},
+ "SHA3-384": &hashPrimitive{"SHA3-384", 48},
+ "SHA3-512": &hashPrimitive{"SHA3-512", 64},
"ACVP-AES-ECB": &blockCipher{"AES", 16, 2, true, false, iterateAES},
"ACVP-AES-CBC": &blockCipher{"AES-CBC", 16, 2, true, true, iterateAESCBC},
"ACVP-AES-CBC-CS3": &blockCipher{"AES-CBC-CS3", 16, 1, false, true, iterateAESCBC},
@@ -93,6 +97,10 @@
"HMAC-SHA2-384": &hmacPrimitive{"HMAC-SHA2-384", 48},
"HMAC-SHA2-512": &hmacPrimitive{"HMAC-SHA2-512", 64},
"HMAC-SHA2-512/256": &hmacPrimitive{"HMAC-SHA2-512/256", 32},
+ "HMAC-SHA3-224": &hmacPrimitive{"HMAC-SHA3-224", 28},
+ "HMAC-SHA3-256": &hmacPrimitive{"HMAC-SHA3-256", 32},
+ "HMAC-SHA3-384": &hmacPrimitive{"HMAC-SHA3-384", 48},
+ "HMAC-SHA3-512": &hmacPrimitive{"HMAC-SHA3-512", 64},
"ctrDRBG": &drbg{"ctrDRBG", map[string]bool{"AES-128": true, "AES-192": true, "AES-256": true}},
"hmacDRBG": &drbg{"hmacDRBG", map[string]bool{"SHA-1": true, "SHA2-224": true, "SHA2-256": true, "SHA2-384": true, "SHA2-512": true}},
"KDF": &kdfPrimitive{},