Re:Kaspersky Password Manager: All your passwords are belong...
by omegalulw on Tuesday July 06, 2021 @02:21PM
(#27752356)
What's wrong with seeding with time so long as you do it with nanoseconds?
[ Parent
| on HN ]
Re:Kaspersky Password Manager: All your passwords are belong...
by simias on Tuesday July 06, 2021 @02:45PM
(#27752678)
That's not the case here, and even then why bother when modern operating systems have ways to easily get you good quality entropy? If you use a decent random library you won't have to bother reinventing the wheel.
I had to generate a 20 char random key string in Rust the other day, I just wrote:
rand::thread_rng()
.sample_iter(&Alphanumeric)
.take(20)
.map(char::from)
.collect()
There. Uniform, decent entropy, explicit, simple.
Re:Kaspersky Password Manager: All your passwords are belong...
by kadoban on Tuesday July 06, 2021 @02:48PM
(#27752720)
You likely can't get a safe amount of entropy from the available resolution in time.
For example, even assuming nanoseconds, that's only log(10^9) bits of entropy if you can guess what second (not that hard, may even be public). That's nowhere near enough.
I'd also doubt that many ways you try to get a nanosecond resolution time actually have that resolution, there's probably discrete steps of lower resolution.