xtest: regression 4001: add more test cases for SHA-3 and SHAKE

Long test cases for SHA3-224/256/384/512 and SHAKE128/256 are included

Signed-off-by: Matthew Shyu <matthew.shyu@amlogic.com>
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
diff --git a/host/xtest/regression_4000.c b/host/xtest/regression_4000.c
index 8a90503..3aa15be 100644
--- a/host/xtest/regression_4000.c
+++ b/host/xtest/regression_4000.c
@@ -1010,6 +1010,284 @@
 };
 
 /*
+ * More SHA-3 test cases from
+ * https://csrc.nist.gov/projects/cryptographic-algorithm-validation-program/secure-hashing
+ * https://csrc.nist.gov/CSRC/media/Projects/Cryptographic-Algorithm-Validation-Program/documents/sha3/sha-3bytetestvectors.zip
+ */
+
+/* Excerpt from SHA3_224LongMsg.rsp */
+static const uint8_t hash_data_sha3_224_in2[] = {
+	0x31, 0xc8, 0x2d, 0x71, 0x78, 0x5b, 0x7c, 0xa6,
+	0xb6, 0x51, 0xcb, 0x6c, 0x8c, 0x9a, 0xd5, 0xe2,
+	0xac, 0xeb, 0x0b, 0x06, 0x33, 0xc0, 0x88, 0xd3,
+	0x3a, 0xa2, 0x47, 0xad, 0xa7, 0xa5, 0x94, 0xff,
+	0x49, 0x36, 0xc0, 0x23, 0x25, 0x13, 0x19, 0x82,
+	0x0a, 0x9b, 0x19, 0xfc, 0x6c, 0x48, 0xde, 0x8a,
+	0x6f, 0x7a, 0xda, 0x21, 0x41, 0x76, 0xcc, 0xda,
+	0xad, 0xae, 0xef, 0x51, 0xed, 0x43, 0x71, 0x4a,
+	0xc0, 0xc8, 0x26, 0x9b, 0xbd, 0x49, 0x7e, 0x46,
+	0xe7, 0x8b, 0xb5, 0xe5, 0x81, 0x96, 0x49, 0x4b,
+	0x24, 0x71, 0xb1, 0x68, 0x0e, 0x2d, 0x4c, 0x6d,
+	0xbd, 0x24, 0x98, 0x31, 0xbd, 0x83, 0xa4, 0xd3,
+	0xbe, 0x06, 0xc8, 0xa2, 0xe9, 0x03, 0x93, 0x39,
+	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, 0x65, 0x62, 0x30, 0xa1, 0x2b, 0xa6, 0xdc,
+	0x78
+};
+
+static const uint8_t hash_data_sha3_224_out2[] = {
+	0xaa, 0xb2, 0x3c, 0x9e, 0x7f, 0xb9, 0xd7, 0xda,
+	0xce, 0xfd, 0xfd, 0x0b, 0x1a, 0xe8, 0x5a, 0xb1,
+	0x37, 0x4a, 0xbf, 0xf7, 0xc4, 0xe3, 0xf7, 0x55,
+	0x6e, 0xca, 0xe4, 0x12
+};
+
+/* Excerpt from SHA3_256LongMsg.rsp */
+static const uint8_t hash_data_sha3_256_in2[] = {
+	0xb1, 0xca, 0xa3, 0x96, 0x77, 0x1a, 0x09, 0xa1,
+	0xdb, 0x9b, 0xc2, 0x05, 0x43, 0xe9, 0x88, 0xe3,
+	0x59, 0xd4, 0x7c, 0x2a, 0x61, 0x64, 0x17, 0xbb,
+	0xca, 0x1b, 0x62, 0xcb, 0x02, 0x79, 0x6a, 0x88,
+	0x8f, 0xc6, 0xee, 0xff, 0x5c, 0x0b, 0x5c, 0x3d,
+	0x50, 0x62, 0xfc, 0xb4, 0x25, 0x6f, 0x6a, 0xe1,
+	0x78, 0x2f, 0x49, 0x2c, 0x1c, 0xf0, 0x36, 0x10,
+	0xb4, 0xa1, 0xfb, 0x7b, 0x81, 0x4c, 0x05, 0x78,
+	0x78, 0xe1, 0x19, 0x0b, 0x98, 0x35, 0x42, 0x5c,
+	0x7a, 0x4a, 0x0e, 0x18, 0x2a, 0xd1, 0xf9, 0x15,
+	0x35, 0xed, 0x2a, 0x35, 0x03, 0x3a, 0x5d, 0x8c,
+	0x67, 0x0e, 0x21, 0xc5, 0x75, 0xff, 0x43, 0xc1,
+	0x94, 0xa5, 0x8a, 0x82, 0xd4, 0xa1, 0xa4, 0x48,
+	0x81, 0xdd, 0x61, 0xf9, 0xf8, 0x16, 0x1f, 0xc6,
+	0xb9, 0x98, 0x86, 0x0c, 0xbe, 0x49, 0x75, 0x78,
+	0x0b, 0xe9, 0x3b, 0x6f,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, 0x14, 0x5b,
+	0x8d, 0x99, 0x65, 0x70, 0xba, 0x88, 0x1a, 0x05
+};
+
+/* Excerpt from SHA3_384LongMsg.rsp */
+static const uint8_t hash_data_sha3_384_in2[] = {
+	0x5f, 0xe3, 0x59, 0x23, 0xb4, 0xe0, 0xaf, 0x7d,
+	0xd2, 0x49, 0x71, 0x81, 0x2a, 0x58, 0x42, 0x55,
+	0x19, 0x85, 0x0a, 0x50, 0x6d, 0xfa, 0x9b, 0x0d,
+	0x25, 0x47, 0x95, 0xbe, 0x78, 0x57, 0x86, 0xc3,
+	0x19, 0xa2, 0x56, 0x7c, 0xba, 0xa5, 0xe3, 0x5b,
+	0xcf, 0x8f, 0xe8, 0x3d, 0x94, 0x3e, 0x23, 0xfa,
+	0x51, 0x69, 0xb7, 0x3a, 0xdc, 0x1f, 0xcf, 0x8b,
+	0x60, 0x70, 0x84, 0xb1, 0x5e, 0x6a, 0x01, 0x3d,
+	0xf1, 0x47, 0xe4, 0x62, 0x56, 0xe4, 0xe8, 0x03,
+	0xab, 0x75, 0xc1, 0x10, 0xf7, 0x78, 0x48, 0x13,
+	0x6b, 0xe7, 0xd8, 0x06, 0xe8, 0xb2, 0xf8, 0x68,
+	0xc1, 0x6c, 0x3a, 0x90, 0xc1, 0x44, 0x63, 0x40,
+	0x70, 0x38, 0xcb, 0x7d, 0x92, 0x85, 0x07, 0x9e,
+	0xf1, 0x62, 0xc6, 0xa4, 0x5c, 0xed, 0xf9, 0xc9,
+	0xf0, 0x66, 0x37, 0x5c, 0x96, 0x9b, 0x5f, 0xcb,
+	0xcd, 0xa3, 0x7f, 0x02, 0xaa, 0xcf, 0xf4, 0xf3,
+	0x1c, 0xde, 0xd3, 0x76, 0x75, 0x70, 0x88, 0x54,
+	0x26, 0xbe, 0xbd, 0x9e, 0xca, 0x87, 0x7e, 0x44,
+	0x67, 0x4e, 0x9a, 0xe2, 0xf0, 0xc2, 0x4c, 0xdd,
+	0x0e, 0x7e, 0x1a, 0xaf, 0x1f, 0xf2, 0xfe, 0x7f,
+	0x80, 0xa1, 0xc4, 0xf5, 0x07, 0x8e, 0xb3, 0x4c,
+	0xd4, 0xf0, 0x6f, 0xa9, 0x4a, 0x2d, 0x1e, 0xab,
+	0x58, 0x06, 0xca, 0x43, 0xfd, 0x0f, 0x06, 0xc6,
+	0x0b, 0x63, 0xd5, 0x40, 0x2b, 0x95, 0xc7, 0x0c,
+	0x21, 0xea, 0x65, 0xa1, 0x51, 0xc5, 0xcf, 0xaf,
+	0x82, 0x62, 0xa4, 0x6b, 0xe3, 0xc7, 0x22, 0x26,
+	0x4b
+};
+
+static const uint8_t hash_data_sha3_384_out2[] = {
+	0x30, 0x54, 0xd2, 0x49, 0xf9, 0x16, 0xa6, 0x03,
+	0x9b, 0x2a, 0x9c, 0x3e, 0xbe, 0xc1, 0x41, 0x87,
+	0x91, 0xa0, 0x60, 0x8a, 0x17, 0x0e, 0x6d, 0x36,
+	0x48, 0x60, 0x35, 0xe5, 0xf9, 0x26, 0x35, 0xea,
+	0xba, 0x98, 0x07, 0x2a, 0x85, 0x37, 0x3c, 0xb5,
+	0x4e, 0x2a, 0xe3, 0xf9, 0x82, 0xce, 0x13, 0x2b
+};
+
+/* Excerpt from SHA3_512LongMsg.rsp */
+static const uint8_t hash_data_sha3_512_in2[] = {
+	0x66, 0x4e, 0xf2, 0xe3, 0xa7, 0x05, 0x9d, 0xaf,
+	0x1c, 0x58, 0xca, 0xf5, 0x20, 0x08, 0xc5, 0x22,
+	0x7e, 0x85, 0xcd, 0xcb, 0x83, 0xb4, 0xc5, 0x94,
+	0x57, 0xf0, 0x2c, 0x50, 0x8d, 0x4f, 0x4f, 0x69,
+	0xf8, 0x26, 0xbd, 0x82, 0xc0, 0xcf, 0xfc, 0x5c,
+	0xb6, 0xa9, 0x7a, 0xf6, 0xe5, 0x61, 0xc6, 0xf9,
+	0x69, 0x70, 0x00, 0x52, 0x85, 0xe5, 0x8f, 0x21,
+	0xef, 0x65, 0x11, 0xd2, 0x6e, 0x70, 0x98, 0x89,
+	0xa7, 0xe5, 0x13, 0xc4, 0x34, 0xc9, 0x0a, 0x3c,
+	0xf7, 0x44, 0x8f, 0x0c, 0xae, 0xec, 0x71, 0x14,
+	0xc7, 0x47, 0xb2, 0xa0, 0x75, 0x8a, 0x3b, 0x45,
+	0x03, 0xa7, 0xcf, 0x0c, 0x69, 0x87, 0x3e, 0xd3,
+	0x1d, 0x94, 0xdb, 0xef, 0x2b, 0x7b, 0x2f, 0x16,
+	0x88, 0x30, 0xef, 0x7d, 0xa3, 0x32, 0x2c, 0x3d,
+	0x3e, 0x10, 0xca, 0xfb, 0x7c, 0x2c, 0x33, 0xc8,
+	0x3b, 0xbf, 0x4c, 0x46, 0xa3, 0x1d, 0xa9, 0x0c,
+	0xff, 0x3b, 0xfd, 0x4c, 0xcc, 0x6e, 0xd4, 0xb3,
+	0x10, 0x75, 0x84, 0x91, 0xee, 0xba, 0x60, 0x3a,
+	0x76
+};
+
+static const uint8_t hash_data_sha3_512_out2[] = {
+	0xe5, 0x82, 0x5f, 0xf1, 0xa3, 0xc0, 0x70, 0xd5,
+	0xa5, 0x2f, 0xbb, 0xe7, 0x11, 0x85, 0x4a, 0x44,
+	0x05, 0x54, 0x29, 0x5f, 0xfb, 0x7a, 0x79, 0x69,
+	0xa1, 0x79, 0x08, 0xd1, 0x01, 0x63, 0xbf, 0xbe,
+	0x8f, 0x1d, 0x52, 0xa6, 0x76, 0xe8, 0xa0, 0x13,
+	0x7b, 0x56, 0xa1, 0x1c, 0xdf, 0x0f, 0xfb, 0xb4,
+	0x56, 0xbc, 0x89, 0x9f, 0xc7, 0x27, 0xd1, 0x4b,
+	0xd8, 0x88, 0x22, 0x32, 0x54, 0x9d, 0x91, 0x4e,
+};
+
+/*
+ * More SHAKE test cases from
+ * https://csrc.nist.gov/projects/cryptographic-algorithm-validation-program/secure-hashing
+ * https://csrc.nist.gov/CSRC/media/Projects/Cryptographic-Algorithm-Validation-Program/documents/sha3/shakebytetestvectors.zip
+ */
+
+/* Excerpt from SHAKE128LongMsg.rsp */
+static const uint8_t hash_data_shake128_in2[] = {
+	0xa6, 0xfe, 0x00, 0x06, 0x42, 0x57, 0xaa, 0x31,
+	0x8b, 0x62, 0x1c, 0x5e, 0xb3, 0x11, 0xd3, 0x2b,
+	0xb8, 0x00, 0x4c, 0x2f, 0xa1, 0xa9, 0x69, 0xd2,
+	0x05, 0xd7, 0x17, 0x62, 0xcc, 0x5d, 0x2e, 0x63,
+	0x39, 0x07, 0x99, 0x26, 0x29, 0xd1, 0xb6, 0x9d,
+	0x95, 0x57, 0xff, 0x6d, 0x5e, 0x8d, 0xeb, 0x45,
+	0x4a, 0xb0, 0x0f, 0x6e, 0x49, 0x7c, 0x89, 0xa4,
+	0xfe, 0xa0, 0x9e, 0x25, 0x7a, 0x6f, 0xa2, 0x07,
+	0x4b, 0xd8, 0x18, 0xce, 0xb5, 0x98, 0x1b, 0x3e,
+	0x3f, 0xae, 0xfd, 0x6e, 0x72, 0x0f, 0x2d, 0x1e,
+	0xdd, 0x9c, 0x5e, 0x4a, 0x5c, 0x51, 0xe5, 0x00,
+	0x9a, 0xbf, 0x63, 0x6e, 0xd5, 0xbc, 0xa5, 0x3f,
+	0xe1, 0x59, 0xc8, 0x28, 0x70, 0x14, 0xa1, 0xbd,
+	0x90, 0x4f, 0x5c, 0x8a, 0x75, 0x01, 0x62, 0x5f,
+	0x79, 0xac, 0x81, 0xeb, 0x61, 0x8f, 0x47, 0x8c,
+	0xe2, 0x1c, 0xae, 0x66, 0x64, 0xac, 0xff, 0xb3,
+	0x05, 0x72, 0xf0, 0x59, 0xe1, 0xad, 0x0f, 0xc2,
+	0x91, 0x22, 0x64, 0xe8, 0xf1, 0xca, 0x52, 0xaf,
+	0x26, 0xc8, 0xbf, 0x78, 0xe0, 0x9d, 0x75, 0xf3,
+	0xdd, 0x9f, 0xc7, 0x34, 0xaf, 0xa8, 0x77, 0x0a,
+	0xbe, 0x0b, 0xd7, 0x8c, 0x90, 0xcc, 0x2f, 0xf4,
+	0x48, 0x10, 0x5f, 0xb1, 0x6d, 0xd2, 0xc5, 0xb7,
+	0xed, 0xd8, 0x61, 0x1a, 0x62, 0xe5, 0x37, 0xdb,
+	0x93, 0x31, 0xf5, 0x02, 0x3e, 0x16, 0xd6, 0xec,
+	0x15, 0x0c, 0xc6, 0xe7, 0x06, 0xd7, 0xc7, 0xfc,
+	0xbf, 0xff, 0x93, 0x0c, 0x72, 0x81, 0x83, 0x1f,
+	0xd5, 0xc4, 0xaf, 0xf8, 0x6e, 0xce, 0x57, 0xed,
+	0x0d, 0xb8, 0x82, 0xf5, 0x9a, 0x5f, 0xe4, 0x03,
+	0x10, 0x5d, 0x05, 0x92, 0xca, 0x38, 0xa0, 0x81,
+	0xfe, 0xd8, 0x49, 0x22, 0x87, 0x3f, 0x53, 0x8e,
+	0xe7, 0x74, 0xf1, 0x3b, 0x8c, 0xc0, 0x9b, 0xd0,
+	0x52, 0x1d, 0xb4, 0x37, 0x4a, 0xec, 0x69, 0xf4,
+	0xba, 0xe6, 0xdc, 0xb6, 0x64, 0x55, 0x82, 0x2c,
+	0x0b, 0x84, 0xc9, 0x1a, 0x34, 0x74, 0xff, 0xac,
+	0x2a, 0xd0, 0x6f, 0x0a, 0x44, 0x23, 0xcd, 0x2c,
+	0x6a, 0x49, 0xd4, 0xf0, 0xd6, 0x24, 0x2d, 0x6a,
+	0x18, 0x90, 0x93, 0x7b, 0x5d, 0x98, 0x35, 0xa5,
+	0xf0, 0xea, 0x5b, 0x1d, 0x01, 0x88, 0x4d, 0x22,
+	0xa6, 0xc1, 0x71, 0x8e, 0x1f, 0x60, 0xb3, 0xab,
+	0x5e, 0x23, 0x29, 0x47, 0xc7, 0x6e, 0xf7, 0x0b,
+	0x34, 0x41, 0x71, 0x08, 0x3c, 0x68, 0x80, 0x93,
+	0xb5, 0xf1, 0x47, 0x53, 0x77, 0xe3, 0x06, 0x98,
+	0x63
+};
+
+static const uint8_t hash_data_shake128_out2[] = {
+	0x31, 0x09, 0xd9, 0x47, 0x2c, 0xa4, 0x36, 0xe8,
+	0x05, 0xc6, 0xb3, 0xdb, 0x22, 0x51, 0xa9, 0xbc
+};
+
+/* Excerpt from SHAKE256LongMsg.rsp */
+static const uint8_t hash_data_shake256_in2[] = {
+	0xdc, 0x5a, 0x10, 0x0f, 0xa1, 0x6d, 0xf1, 0x58,
+	0x3c, 0x79, 0x72, 0x2a, 0x0d, 0x72, 0x83, 0x3d,
+	0x3b, 0xf2, 0x2c, 0x10, 0x9b, 0x88, 0x89, 0xdb,
+	0xd3, 0x52, 0x13, 0xc6, 0xbf, 0xce, 0x20, 0x58,
+	0x13, 0xed, 0xae, 0x32, 0x42, 0x69, 0x5c, 0xfd,
+	0x9f, 0x59, 0xb9, 0xa1, 0xc2, 0x03, 0xc1, 0xb7,
+	0x2e, 0xf1, 0xa5, 0x42, 0x31, 0x47, 0xcb, 0x99,
+	0x0b, 0x53, 0x16, 0xa8, 0x52, 0x66, 0x67, 0x58,
+	0x94, 0xe2, 0x64, 0x4c, 0x3f, 0x95, 0x78, 0xce,
+	0xbe, 0x45, 0x1a, 0x09, 0xe5, 0x8c, 0x53, 0x78,
+	0x8f, 0xe7, 0x7a, 0x9e, 0x85, 0x09, 0x43, 0xf8,
+	0xa2, 0x75, 0xf8, 0x30, 0x35, 0x4b, 0x05, 0x93,
+	0xa7, 0x62, 0xba, 0xc5, 0x5e, 0x98, 0x4d, 0xb3,
+	0xe0, 0x66, 0x1e, 0xca, 0x3c, 0xb8, 0x3f, 0x67,
+	0xa6, 0xfb, 0x34, 0x8e, 0x61, 0x77, 0xf7, 0xde,
+	0xe2, 0xdf, 0x40, 0xc4, 0x32, 0x26, 0x02, 0xf0,
+	0x94, 0x95, 0x39, 0x05, 0x68, 0x1b, 0xe3, 0x95,
+	0x4f, 0xe4, 0x4c, 0x4c, 0x90, 0x2c, 0x8f, 0x6b,
+	0xba, 0x56, 0x5a, 0x78, 0x8b, 0x38, 0xf1, 0x34,
+	0x11, 0xba, 0x76, 0xce, 0x0f, 0x9f, 0x67, 0x56,
+	0xa2, 0xa2, 0x68, 0x74, 0x24, 0xc5, 0x43, 0x5a,
+	0x51, 0xe6, 0x2d, 0xf7, 0xa8, 0x93, 0x4b, 0x6e,
+	0x14, 0x1f, 0x74, 0xc6, 0xcc, 0xf5, 0x39, 0xe3,
+	0x78, 0x2d, 0x22, 0xb5, 0x95, 0x5d, 0x3b, 0xaf,
+	0x1a, 0xb2, 0xcf, 0x7b, 0x5c, 0x3f, 0x74, 0xec,
+	0x2f, 0x94, 0x47, 0x34, 0x4e, 0x93, 0x79, 0x57,
+	0xfd, 0x7f, 0x0b, 0xdf, 0xec, 0x56, 0xd5, 0xd2,
+	0x5f, 0x61, 0xcd, 0xe1, 0x8c, 0x09, 0x86, 0xe2,
+	0x44, 0xec, 0xf7, 0x80, 0xd6, 0x30, 0x7e, 0x31,
+	0x31, 0x17, 0x25, 0x69, 0x48, 0xd4, 0x23, 0x0e,
+	0xbb, 0x9e, 0xa6, 0x2b, 0xb3, 0x02, 0xcf, 0xe8,
+	0x0d, 0x7d, 0xfe, 0xba, 0xbc, 0x4a, 0x51, 0xd7,
+	0x68, 0x79, 0x67, 0xed, 0x5b, 0x41, 0x6a, 0x13,
+	0x9e, 0x97, 0x4c, 0x00, 0x5f, 0xff, 0x50, 0x7a,
+	0x96
+};
+
+static const uint8_t hash_data_shake256_out2[] = {
+	0x2b, 0xac, 0x57, 0x16, 0x80, 0x3a, 0x9c, 0xda,
+	0x8f, 0x9e, 0x84, 0x36, 0x5a, 0xb0, 0xa6, 0x81,
+	0x32, 0x7b, 0x5b, 0xa3, 0x4f, 0xde, 0xdf, 0xb1,
+	0xc1, 0x2e, 0x6e, 0x80, 0x7f, 0x45, 0x28, 0x4b,
+};
+
+/*
  * SM3
  * https://tools.ietf.org/html/draft-sca-cfrg-sm3-02
  * Appendix A.1
@@ -1075,16 +1353,28 @@
 			hash_data_sha512_out1),
 	XTEST_HASH_CASE(TEE_ALG_SHA3_224, 1, hash_data_sha3_in1,
 			hash_data_sha3_224_out1),
+	XTEST_HASH_CASE(TEE_ALG_SHA3_224, 4, hash_data_sha3_224_in2,
+			hash_data_sha3_224_out2),
 	XTEST_HASH_CASE(TEE_ALG_SHA3_256, 1, hash_data_sha3_in1,
 			hash_data_sha3_256_out1),
+	XTEST_HASH_CASE(TEE_ALG_SHA3_256, 4, hash_data_sha3_256_in2,
+			hash_data_sha3_256_out2),
 	XTEST_HASH_CASE(TEE_ALG_SHA3_384, 1, hash_data_sha3_in1,
 			hash_data_sha3_384_out1),
+	XTEST_HASH_CASE(TEE_ALG_SHA3_384, 4, hash_data_sha3_384_in2,
+			hash_data_sha3_384_out2),
 	XTEST_HASH_CASE(TEE_ALG_SHA3_512, 1, hash_data_sha3_in1,
 			hash_data_sha3_512_out1),
+	XTEST_HASH_CASE(TEE_ALG_SHA3_512, 4, hash_data_sha3_512_in2,
+			hash_data_sha3_512_out2),
 	XTEST_HASH_CASE(TEE_ALG_SHAKE128, 1, hash_data_sha3_in1,
 			hash_data_shake128_out1),
+	XTEST_HASH_CASE(TEE_ALG_SHAKE128, 4, hash_data_shake128_in2,
+			hash_data_shake128_out2),
 	XTEST_HASH_CASE(TEE_ALG_SHAKE256, 1, hash_data_sha3_in1,
 			hash_data_shake256_out1),
+	XTEST_HASH_CASE(TEE_ALG_SHAKE256, 4, hash_data_shake256_in2,
+			hash_data_shake256_out2),
 	XTEST_HASH_CASE(TEE_ALG_SM3, 2, hash_data_sm3_a1_in,
 			hash_data_sm3_a1_out),
 	XTEST_HASH_CASE(TEE_ALG_SM3, 19, hash_data_sm3_a2_in,