typedef struct signer_test_vector_t signer_test_vector_t;
typedef struct hasher_test_vector_t hasher_test_vector_t;
typedef struct prf_test_vector_t prf_test_vector_t;
+typedef struct xof_test_vector_t xof_test_vector_t;
typedef struct rng_test_vector_t rng_test_vector_t;
typedef struct dh_test_vector_t dh_test_vector_t;
u_char *out;
};
+struct xof_test_vector_t {
+ /** xof algorithm this test vector tests */
+ ext_out_function_t alg;
+ /** size of the seed data */
+ size_t len;
+ /** seed data */
+ u_char *seed;
+ /** size of the output */
+ size_t out_len;
+ /** expected output of size*/
+ u_char *out;
+};
+
/**
* Test vector for a RNG.
*
bool (*test_prf)(crypto_tester_t *this, pseudo_random_function_t alg,
prf_constructor_t create,
u_int *speed, const char *plugin_name);
+ /**
+ * Test an XOF algorithm.
+ *
+ * @param alg algorithm to test
+ * @param create constructor function for the XOF
+ * @param speed speed test result, NULL to omit
+ * @return TRUE if test passed
+ */
+ bool (*test_xof)(crypto_tester_t *this, ext_out_function_t alg,
+ xof_constructor_t create,
+ u_int *speed, const char *plugin_name);
/**
* Test a RNG implementation.
*
*/
void (*add_prf_vector)(crypto_tester_t *this, prf_test_vector_t *vector);
+ /**
+ * Add a test vector to test an XOF.
+ *
+ * @param vector pointer to test vector
+ */
+ void (*add_xof_vector)(crypto_tester_t *this, xof_test_vector_t *vector);
+
/**
* Add a test vector to test a RNG.
*