I have an embedded system. What I would like for it to do when it powers up or otherwise resets, is to generate a unique ID, so that on different restarts a different unique ID is generated with high probability.
It does not have access to a real-time clock, but it does have access to an ADC and a UART. I am wondering if there is a decent way to gather entropy from these sources to generate a unique ID. I am vaguely familiar with Yarrow. Is there a good way to use this?
Unfortunately I do not have any noise sources of predictable characteristics; the ADC is connected to a number of relatively-low-noise inputs, so I suppose I could just use the least-significant bits of the ADC as inputs.
edit: for what it's worth, this is the TI TMS320F28335 processor.
update/clarification: I was looking for a method in software of gathering entropy. I found another way to solve my problem, so in a way, my question was a moot point, but I am still looking for guidance on specific software solutions to gather entropy from low-entropy sources like least-significant bits of the ADC and system timing for receiving UART characters.
I've used:
the lowest bit of a floating ADC input, but you touched on that
an extremely high-resolution timer (~10ns), and taken the lowest "n" bits when timing between user keypresses. If you accept that user keypresses (at the highest timing resolution) are effectively random in their timing, it works pretty well.
You could also time things like time between network packets, etc. but those can be a lot more deterministic/predictable than what a lot of people thing. Electrical noise and user interaction are better sources of entropy.
By the way, on the "timings between keypresses" stuff, I tend to store those on an embedded system starting at power-on, in a circular buffer of the last 8 or so, because you never know when you're going to need them. (IN other words: Don't wait until you need the random bits, and then force the user to press buttons 3 times!)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With