Random Number Generation
Posted: Mon 6. Dec 2021, 04:17
I am looking into implementing random number generation on my PCAN-Router FD hardware. As I understand it, there is no TRNG built into the microcontroller. I do not need it to be a perfect solution, just demonstrably better than PRNG. What is the best way to go about doing this? I have a few ideas:
- Derive some value from timestamps using the systime module and seed a PRNG.
- Read noise (or potentially attach some noise) from a digital input pin as a bitstream and use to seed a PRNG.
- Generate some TRNG value at compile time on my hardware, and use it to seed a PRNG
- Make some use of the EEPROM in combination with a method above?