diff --git a/src/crypto/rand/rand_baremetal.go b/src/crypto/rand/rand_baremetal.go index 6f3370e9..fe9fea2a 100644 --- a/src/crypto/rand/rand_baremetal.go +++ b/src/crypto/rand/rand_baremetal.go @@ -1,5 +1,5 @@ -//go:build nrf52840 || stm32 || (sam && atsamd51) || (sam && atsame5x) || rp2040 -// +build nrf52840 stm32 sam,atsamd51 sam,atsame5x rp2040 +//go:build nrf52840 || stm32 || (sam && atsamd51) || (sam && atsame5x) +// +build nrf52840 stm32 sam,atsamd51 sam,atsame5x package rand diff --git a/src/machine/machine_rp2040_rng.go b/src/machine/machine_rp2040_rng.go index 246dadfa..e300b1ab 100644 --- a/src/machine/machine_rp2040_rng.go +++ b/src/machine/machine_rp2040_rng.go @@ -13,6 +13,10 @@ import ( const numberOfCycles = 32 // GetRNG returns 32 bits of semi-random data based on ring oscillator. +// +// Unlike some other implementations of GetRNG, these random numbers are not +// cryptographically secure and must not be used for cryptographic operations +// (nonces, etc). func GetRNG() (uint32, error) { var val uint32 for i := 0; i < 4; i++ {