adafruit / circuitpython

CircuitPython - a Python implementation for teaching coding with microcontrollers
https://circuitpython.org
Other
4.04k stars 1.19k forks source link

Consider using TRNG for RP2350 #9501

Open deshipu opened 1 month ago

deshipu commented 1 month ago

The RP2350 has a new peripheral for a true random generator, it could be nice to make use of it.

jepler commented 1 month ago

Based on a quick perusal of the 2350 datasheet the 2040 compatible "rosc randombit" generator should work with the new chip but using the new hw module mother be faster or something.

jepler commented 1 month ago

Better yet switch to pico rand from the sdk and delete my "crypto" code from circuitpthon. It will select the right hw mode for generating random bytes

jepler commented 2 weeks ago

I would probably drop this from the 9.2.0 milestone. While I don't actually have any RP2350 hardware for testing, I believe the ROSC based RNG is currently working on both chips, so this is not urgent missing functionality.