News for hackers. Stuff that matters.
Re:Problems emerge for a unified /dev/*random by anonymousiam on Tuesday March 29, 2022 @07:50PM (#30849851)
Yeah, but it always returns the same pseudo random sequence of numbers. THAT'S part of what they're trying to fix by including entropy.
Re:Problems emerge for a unified /dev/*random by FrenchDevRemote on Tuesday March 29, 2022 @07:54PM (#30849873)
what if you add timestamp?
Re:Problems emerge for a unified /dev/*random by richdougherty on Wednesday March 30, 2022 @05:58AM (#30853218)
Here's a fun article about hacking online poker, in part by taking advantage of a time-based seed:

https://www.developer.com/guides/how-we-learned-to-cheat-at-...

"The system clock seed gave us an idea that reduced the number of possible shuffles even further. By synchronizing our program with the system clock on the server generating the pseudo-random number, we are able to reduce the number of possible combinations down to a number on the order of 200,000 possibilities. After that move, the system is ours, since searching through this tiny set of shuffles is trivial and can be done on a PC in real time."

Re:Problems emerge for a unified /dev/*random by sillysaurusx on Tuesday March 29, 2022 @07:58PM (#30849897)
From what source? That’s the hard part.

Think of it in terms of VM snapshots. If you boot from a snapshot, there’s no way to get any timestamp guaranteed to be secure.

But “secure” in this context is misleading. I subscribe to the “just use urandom” school of thought. It’s sufficiently secure in practice that no real security threats have emerged (can anyone point to a CVE?) and it seems like a waste of time to focus on this rather than the hundreds of other cases that cause dozens of CVEs.

Re:Problems emerge for a unified /dev/*random by caf on Wednesday March 30, 2022 @12:56AM (#30851624)
Re:Problems emerge for a unified /dev/*random by staticassertion on Tuesday March 29, 2022 @08:18PM (#30850072)
The source shouldn't be an issue even if the timestamp is reused. Timestamps just don't add a ton of entropy - a timestamp is generally 64bits, so even if it were actually random you could only ever get 64bits of entropy. And it's obviously way way way less than that since the clock is probably somewhat accurate, the computer is probably less than ~10 years old, and it's probably not way in the future.

So it should be fine to add in, but I don't know how many bits you'd want to count that as.

Re:Problems emerge for a unified /dev/*random by AnonHP on Tuesday March 29, 2022 @07:59PM (#30849909)
That would also make it predictable. Essentially, if you get a sequence of random numbers, it should be quite hard to predict what the next one would be.
Re:Problems emerge for a unified /dev/*random by stouset on Tuesday March 29, 2022 @09:37PM (#30850581)
Then if I know about when you turned your computer on, I can guess every random number you'll ever generate.
Re:Problems emerge for a unified /dev/*random by postalrat on Tuesday March 29, 2022 @11:32PM (#30851252)
If they used a timestamp then all you really need is a couple random numbers to find the seed. Just keep guessing timestamps until you find a sequence that matches.
Re:Problems emerge for a unified /dev/*random by anonymousiam on Tuesday March 29, 2022 @10:41PM (#30850984)
Not all computers have a RTC.
Re:Problems emerge for a unified /dev/*random by woodruffw on Tuesday March 29, 2022 @11:15PM (#30851185)
The presence or absence of a real-time clock doesn't significantly change the problem here.
Re:Problems emerge for a unified /dev/*random by staticassertion on Tuesday March 29, 2022 @08:09PM (#30849999)
Yep, that is a good idea! But a timestamp only adds a little bit of entropy, and you want a few hundred if not a few thousand bits.