Software APIs
sw
device
tests
entropy_src_kat_impl.h
1
// Copyright lowRISC contributors (OpenTitan project).
2
// Licensed under the Apache License, Version 2.0, see LICENSE for details.
3
// SPDX-License-Identifier: Apache-2.0
4
5
#ifndef OPENTITAN_SW_DEVICE_TESTS_ENTROPY_SRC_KAT_IMPL_H_
6
#define OPENTITAN_SW_DEVICE_TESTS_ENTROPY_SRC_KAT_IMPL_H_
7
8
#include <
stdbool.h
>
9
10
#include "
sw/device/lib/dif/dif_entropy_src.h
"
11
12
/**
13
* Runs known answer test for the entropy_src SHA-3 conditioner.
14
*
15
* This test uses the following SHA3 CAVP test vector:
16
*
17
* Msg=a90d2aa5b241e1ca9dab5b6dc05c3e2c93fc5a2210a6315d60f9b791b36b560d70e135ef8e7dba9441b74e53dab0606b
18
* MD=4a16881ce156f45fdfdb45088e3f23be1b4c5a7a6a35315d36c51c75f275733319aca185d4ab33130ffe45f751f1bbc5
19
*
20
* See:
21
* https://csrc.nist.gov/projects/cryptographic-algorithm-validation-program/secure-hashing
22
*
23
* This test stops all the entropy blocks (entropy_src, csrng, edn0, edn1), and
24
* configures the entropy_src in firmware override mode to inject data into the
25
* conditioner and inspect its output. The test throws a test assertion on any
26
* failures.
27
*
28
* The caller should use one of the functions from the entropy_testutils module
29
* to configure the entropy blocks after running this test.
30
*
31
* @param entropy_src Entropy source handle.
32
*/
33
void
entropy_src_kat_test(dif_entropy_src_t *entropy_src);
34
35
#endif
// OPENTITAN_SW_DEVICE_TESTS_ENTROPY_SRC_KAT_IMPL_H_
Return to
OpenTitan Documentation