nrf: make GetRNG available to all chips

All nrf chips have a cryptographically secure RNG on board. Therefore,
I've made the code more portable so that it works on all nrf chips.

I did remove a number of exported functions. I am of the opinion that
these should only be made available once we have an agreed upon API for
multiple chips. People who want to have greater control over the RNG
should use the device/nrf package directly instead.

I have also changed the behavior to always enable digital error
correction. Enabling it seems like a more conservative (and secure)
default to me. Again, people who would like to have it disabled can use
the device/nrf package directly.
This commit is contained in:
Ayke van Laethem
2022-09-15 17:25:34 +02:00
committed by Ron Evans
parent 4af530f238
commit 91e9c84d85
3 changed files with 29 additions and 62 deletions
+2 -2
View File
@@ -1,5 +1,5 @@
//go:build nrf52840 || stm32 || (sam && atsamd51) || (sam && atsame5x)
// +build nrf52840 stm32 sam,atsamd51 sam,atsame5x
//go:build nrf || stm32 || (sam && atsamd51) || (sam && atsame5x)
// +build nrf stm32 sam,atsamd51 sam,atsame5x
package rand