News for hackers. Stuff that matters.
Re:Lemonade Stand by dmurray on Wednesday March 13, 2024 @06:20PM (#39698280)
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.

Re:Lemonade Stand by TazeTSchnitzel on Wednesday March 13, 2024 @06:50PM (#39698538)
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.
Re:Lemonade Stand by boomboomsubban on Wednesday March 13, 2024 @11:24PM (#39700304)
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
Re:Lemonade Stand by thristian on Wednesday March 13, 2024 @11:10PM (#39700231)
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/

Re:Lemonade Stand by cortesoft on Thursday March 14, 2024 @12:21AM (#39700580)
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.