a no-parts solution to seeding the routine is to use a closed loop counter to trigger the WDT. Because WDT is temperature- sensitive, the LSB of the counter might be random enough for use in seeding the rest of the routine. alice > > It works terrible fine. I bet that you can4t guess the value of a counter > > that runs at 1Mhz. > > Sounds good when asynchronous and fast compared to the read-rate. Like in > your particular implementation. > > A dangerous implementation would be to use the internal TMR of a controller > instead of an asynchronous one. Probably you have your keyboard reader > in the TMR interrupt. Probably you need a new "random" value when the > user starts a game - by pressing the START _key_! THAT would be a bad > implementation of the (good) idea. > > When it comes to security/cryptography, you must avoid that the user can > influence the random number algorithm. In your example that could be > to remove the external counter and replace it by his own generated signal, > and thereby enforce the generation of weak session keys etc.