[riot-notifications] [RIOT-OS/RIOT] cpu/nrf5x_common: enable bias correction in hwrng (#14002)

Peter Kietzmann notifications at github.com
Fri May 1 17:22:31 CEST 2020

### Contribution description

The nRF5x MCUs embed a bias correction mechanism for the hardware random number generator ("digital error correction" on nRF51) to ensure a statistically uniform distribution of the random values. This post processing increases generation time (factor of more than 2), but statistically it is absolutely worth it. Since we typically use the HWRNG only once for PRNG seeding, its numbers should be high quality whereas performance is secondary.

This PR enables bias correction for all nRF5x platforms. I've checked the manuals for nRF51, nRF52832, nRF5840 and they all support it.

### Testing procedure

- "Play" with *tests/rng* (change random source to HWRNG by `source 2`).
- "Play" with *tests/periph_hwrng*.
- Check reference manuals.
- Optionally, pipe data to a statistical analysis tool and see that random properties are notably improved with bias correction.

You can view, comment on, or merge this pull request online at:


-- Commit Summary --

  * cpu/nrf5x_common: enable bias correction in hwrng

-- File Changes --

    M cpu/nrf5x_common/periph/hwrng.c (3)

-- Patch Links --


You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20200501/644886cc/attachment-0001.htm>

More information about the notifications mailing list