summaryrefslogtreecommitdiff
path: root/examples/fips_validation/fips_validation.h
diff options
context:
space:
mode:
authorDamian Nowak <damianx.nowak@intel.com>2019-03-19 10:43:48 +0100
committerAkhil Goyal <akhil.goyal@nxp.com>2019-03-22 15:54:24 +0100
commitf4797bae00502b9fd3db0bae80cd933f69b33060 (patch)
tree70a79d13b86f8f2ea473a1a8def1a0bfdf78161a /examples/fips_validation/fips_validation.h
parentf194f19821fd959d0c4433fcfc8531aee56d642b (diff)
downloaddpdk-f4797bae00502b9fd3db0bae80cd933f69b33060.zip
dpdk-f4797bae00502b9fd3db0bae80cd933f69b33060.tar.gz
dpdk-f4797bae00502b9fd3db0bae80cd933f69b33060.tar.xz
examples/fips_validation: support plain SHA
This patch enables plain SHA algorithm CAVP test support in fips_validation sample application. Signed-off-by: Damian Nowak <damianx.nowak@intel.com> Acked-by: Fan Zhang <roy.fan.zhang@intel.com> Acked-by: Marko Kovacevic <marko.kovacevic@intel.com>
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