1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
RIOT/tests/rng
Gerson Fernando Budke 4a9f0efb6d boards: introduce atmega328p-xplained-mini
Add ATmega328P Xplained Mini board.  The board is an official
development kit from MCHP based on the Arduino UNO, reduced
hardware, with a xplainedmini debugger and CDC ACM serial
converter.

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2021-03-27 14:10:19 -03:00
..
tests tests/rng: expect shell prompt in test 2019-05-28 15:43:15 +02:00
main.c many typo fixes 2019-11-23 22:39:07 +01:00
Makefile tests: BOARD_INSUFFICIENT_MEMORY -> Makefile.ci 2019-10-17 15:11:59 +02:00
Makefile.ci boards: introduce atmega328p-xplained-mini 2021-03-27 14:10:19 -03:00
README.md tests/rng: add tests for random_uint32_range() 2018-06-26 14:08:46 +02:00
test.c picolibc: Use most NEWLIB code with picolibc 2020-08-24 08:26:16 -07:00
test.h tests/rng: add tests for random_uint32_range() 2018-06-26 14:08:46 +02:00

RNG

Test application for the RNG sourcs.

Supported commands

  • distributions [N] — Take N samples and print a bit distribution graph on the terminal.
  • dump [N][A B] — Take N samples and print them on the terminal. If A and B are set, the PRNG returns values in the [A,B)-interval.
  • fips — Run the FIPS 140-2 random number tests.
  • entropy [N] — Calculate Shannon's entropy from N samples.
  • seed [N] — Set the random seed to use.
  • source [N] — Select the RNG source, or list them all.
  • speed [N][A B] — Run a PRNG for N seconds and print the number of KiB/sec afterwards. If A and B are set, the PRNG returns values in the [A,B)-interval.

Sources

The following sources are supported:

  • PRNG
  • HW RNG (if available)
  • Constant number (uses the seed)

The PRNG is re-initialized before every test, using the given seed (default is 0).

A constant number source is useful to see if the test itself work, e.g. indicate failures.

Warning

The tools available in this test do not garruantee that a given RNG source is secure. It should, however, rule out basic failures using statistical tests.