aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/crypto
diff options
context:
space:
mode:
authorAyke van Laethem <[email protected]>2022-09-15 11:05:56 +0200
committerRon Evans <[email protected]>2022-09-16 14:48:41 +0200
commitd3863f337d7370ef73e9de7d214ff3b8357ecf10 (patch)
tree5e5e366fa8ab98dcc6d4b728cc784d26dda19ce4 /src/crypto
parent5551ec7a1ed9d59764cfdf5a73b23dc40365a6f8 (diff)
downloadtinygo-d3863f337d7370ef73e9de7d214ff3b8357ecf10.tar.gz
tinygo-d3863f337d7370ef73e9de7d214ff3b8357ecf10.zip
rp2040: do not use GetRNG in crypto/rand
The crypto/rand package is used for sensitive cryptographic operations. Do not use the rp2040 RNG for this purpose, because it's not strong enough for cryptography. I think it is _possible_ to make use of the RP2040 RNG to create cryptographically secure pseudo-random numbers, but it needs some entropy calculation and secure hashing (blake2s or so) to make them truly unpredictable.
Diffstat (limited to 'src/crypto')
-rw-r--r--src/crypto/rand/rand_baremetal.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/crypto/rand/rand_baremetal.go b/src/crypto/rand/rand_baremetal.go
index 6f3370e96..fe9fea2a0 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