opentitan
opentitan copied to clipboard
entropy_src: add test to retrieve entropy via UART and run NIST tools
Added a test to retrieve entropy from entropy_src and dump in on UART as hex, scripts to parse log and extract it and prepare for NIST Entropy Assessment tools.
Entropy is captured in 2 modes:
- Continuous, in chunks of 80KB (limited to memory buffer), which is 655360 1-bit samples or 163840 4-bit samples.
- Restart mode in chunks of 1000 1-bit or 4-bit samples alternated with module disable/enable for restart test (check that entropy doesn't degrade if entropy source is power cycled).
./bazelisk.sh run //sw/host/opentitantool -- transport init
./bazelisk.sh test --test_output=streamed --cache_test_results=no
//sw/device/tests:entropy_src_fw_observe_retrieve_test_silicon_owner_prodc_rom_ext
./entropy.py bazel-testlogs/sw/device/tests/entropy_src_fw_observe_retrieve_test_silicon_owner_prodc_rom_ext/test.log
./nist_test.sh test_0
Issue https://github.com/lowRISC/opentitan/issues/2111