Hacker News new | past | comments | ask | show | jobs | submit login

I remember this being the recommended way to get random numbers in some programming magazine or textbook, in a BASIC without built-in RAND(). Amazing work to discover this yourself at age 9!

And if you squint, using mouse movements as a source of entropy is still used by some modern programs. Some SSH key generators use it, and I'm sure I've had a Linux installer ask me for it too in recent years. I'm not sure whether this is theatre or whether the OS really can't be relied on to provide suitable entropy itself.




I think old console games (e.g. for the NES) were like this. You can record the inputs for a speedrun dependant on RNG and replay them on a real console, and so long as the timing is maintained exactly, the RNG outputs will be the same. This has been demonstrated with a tool called TASbot.


I don't think TASbot is a real tool, it's an avatar for any tool assisted speed run using a variety of tools unique to a specific system or game. See https://tas.bot/wiki/Main_Page


A little of column A, a little of column B.

Generally a key generator does not itself watch for mouse-movements, it just gets random noise from the OS. But the OS gets its random noise from a random number generator, and the random number generator needs to be seeded with genuine randomness. Some CPUs provide a hardware RNG, but older CPUs do not, and some OSs do not trust a hardware RNG implemented in opaque, un-auditable microcode, so they get their randomness from things like the difference between the CPU clock and real-time clock[1] or the relative timing of interrupts... such as those caused by mouse-movement or keyboard key presses.

[1]: https://www.finnie.org/software/twuewand/


Yeah, sometimes I am surprised by what I was able to figure out as a kid, with no internet or anyone to really ask how to do things. I had books, but mostly just figured stuff out.

I recreated bastardized versions of so many data types that I learned about much later.




Consider applying for YC's Summer 2025 batch! Applications are open till May 13

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: