This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

RNG (Random) on Cortex-M4

Many implementations on Cortex requires true random number generation.

It is very common to use seed based on the tick counter and then rand() function which is "just" a constant fixed known function.

However, if after each reset, application get the tick at the same time (most probably) it will produce the same "randoms"  :-(

- I curious to know community opinion and knowledge about that problem?
- Any ideas how to collect more entropy?

Off-course, without using special hardware (TRNG) for that.

Amir

Parents
  • Hi Amir,

    True random number generator in microcontrollers (MCUs) are getting quite common. So it shouldn't be that hard to find the right MCU for your project. In case you are stuck with an MCU that don't have TRNG, you could consider using an ADC on the chip to sample some analog noise (e.g. noise from power supply) to create entropies (statistically it is not true random but maybe fit for your applications).

    The duration of a PLL locking might also provide some level of randomness but it might not be easy to measure that in some devices.

    regards,

    Joseph

Reply
  • Hi Amir,

    True random number generator in microcontrollers (MCUs) are getting quite common. So it shouldn't be that hard to find the right MCU for your project. In case you are stuck with an MCU that don't have TRNG, you could consider using an ADC on the chip to sample some analog noise (e.g. noise from power supply) to create entropies (statistically it is not true random but maybe fit for your applications).

    The duration of a PLL locking might also provide some level of randomness but it might not be easy to measure that in some devices.

    regards,

    Joseph

Children