summaryrefslogtreecommitdiff
path: root/examples/fips_validation/fips_validation.h
diff options
context:
space:
mode:
Diffstat (limited to 'examples/fips_validation/fips_validation.h')
-rw-r--r--examples/fips_validation/fips_validation.h17
1 files changed, 16 insertions, 1 deletions
diff --git a/examples/fips_validation/fips_validation.h b/examples/fips_validation/fips_validation.h
index 3e291bc..b604db9 100644
--- a/examples/fips_validation/fips_validation.h
+++ b/examples/fips_validation/fips_validation.h
@@ -14,6 +14,7 @@
#define MAX_NB_TESTS 10240
#define MAX_BUF_SIZE 2048
#define MAX_STRING_SIZE 64
+#define MAX_DIGEST_SIZE 64
#define POSITIVE_TEST 0
#define NEGATIVE_TEST -1
@@ -29,6 +30,7 @@ enum fips_test_algorithms {
FIPS_TEST_ALGO_AES_CCM,
FIPS_TEST_ALGO_HMAC,
FIPS_TEST_ALGO_TDES,
+ FIPS_TEST_ALGO_SHA,
FIPS_TEST_ALGO_MAX
};
@@ -111,6 +113,11 @@ enum fips_ccm_test_types {
CCM_DVPT, /* Decryption-Verification Process Test */
};
+enum fips_sha_test_types {
+ SHA_KAT = 0,
+ SHA_MCT
+};
+
struct aesavs_interim_data {
enum fips_aesavs_test_types test_type;
uint32_t cipher_algo;
@@ -135,6 +142,11 @@ struct ccm_interim_data {
uint32_t iv_len;
};
+struct sha_interim_data {
+ enum fips_sha_test_types test_type;
+ enum rte_crypto_auth_algorithm algo;
+};
+
struct fips_test_interim_info {
FILE *fp_rd;
FILE *fp_wr;
@@ -150,7 +162,7 @@ struct fips_test_interim_info {
struct hmac_interim_data hmac_data;
struct tdes_interim_data tdes_data;
struct ccm_interim_data ccm_data;
-
+ struct sha_interim_data sha_data;
} interim_info;
enum fips_test_op op;
@@ -201,6 +213,9 @@ int
parse_test_ccm_init(void);
int
+parse_test_sha_init(void);
+
+int
parser_read_uint8_hex(uint8_t *value, const char *p);
int