- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I need to generate a buffer filled with random bytes not equal to 0 and I was wondering what would be the most effective in terms of power consumption.
First, between the PRNG and the TRNG, is there a significant difference in power consumption?
Also, out of the following options, which one would be the best in terms of power consumption:
- Generate a 4 bytes random number, but only check the first byte. If it is not 0, add it to the buffer. Repeat until buffer is full.
- Generate a 4 bytes random number. Add the 4 bytes to the buffer if none of them is 0. Repeat until buffer is full.
- Generate a 4 bytes random number. Loop through the 4 bytes. If it is not 0, add it to the buffer. Repeat until buffer is full.
Thanks!
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi AnCi_2234676
PRNG would be lower power consuming since it is implemented using a LFSR. The TRNG has 6 ring oscillators running between 90 and above 500 MHz.
As far as the most efficient way to store non-zero 32-bit numbers, just check the entire 32-bit value for zero once you get it.
Regards
Hari
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi AnCi_2234676
PRNG would be lower power consuming since it is implemented using a LFSR. The TRNG has 6 ring oscillators running between 90 and above 500 MHz.
As far as the most efficient way to store non-zero 32-bit numbers, just check the entire 32-bit value for zero once you get it.
Regards
Hari