Re:There's Math.random(), and then there's Math.random()
by sverhagen on Friday February 07, 2025 @05:57AM
(#42971300)
Those nanoseconds aren't really entropy then, are they?
[ Parent
| on HN ]
Re:There's Math.random(), and then there's Math.random()
by lmm on Friday February 07, 2025 @06:35AM
(#42971499)
They're entropy for most practical purposes. But there's only 1000 possibilities, so that's less than 10 bits' worth.
Re:There's Math.random(), and then there's Math.random()
by boothby on Friday February 07, 2025 @09:05AM
(#42972636)
Especially if you're writing a file, the creation time is a big hint! Even nanoseconds won't help if you're leaking that many bits from your seed.
Re:There's Math.random(), and then there's Math.random()
by tomsmeding on Friday February 07, 2025 @10:01AM
(#42973367)
That's milliseconds; nanoseconds are 1e-9 seconds. Still, the file creation time remark of sibling is pertinent.