Creating a CSPRNG for DOS? (Developers)
In the hope of getting a good answer. I'm currently thinking about cryptographically safe random number generator for DOS. In the general sense, and not DOSBox specific.
For random seeding, I'd like to hook the kbd interrupt, or maybe some of the auxiliary interrupts for the BIOS, maybe the mouse as well, and/or the clock. If possible, network and other I/O such as serial.
The reason I'm overthinking this, is that I'm currently thinking of command line tools, rather than full screen applications, and that means having a CSPRNG that updates its seed between invocations, if possible.
If I were only thinking of a full screen application, I'd just hook the kbd interrupt, and hope the user types enough to have a good seed.
Implementing Fortuna is the easy part; it's hooking the various "noise sources" and doing that in a way that can be small enough to not interfere with most of the DOS programs out there that require a lot of conventional RAM. Another consideration is to do it in a way that works both on real hardware, and emulators such as DOSBox because someone's going to run it in a basic emulator eventually. And that means not relying on features only present in DOSBox-X or such.
So what strategies are good, which are bad, and what are my options?
Complete thread:
- Creating a CSPRNG for DOS? - myrkraverk, 01.06.2024, 14:50
- Creating a CSPRNG for DOS? - rosegondon, 01.06.2024, 18:27
- Creating a CSPRNG for DOS? - myrkraverk, 02.06.2024, 01:14
- Creating a CSPRNG for DOS? - SuperIlu, 02.06.2024, 14:11
- Creating a CSPRNG for DOS? - myrkraverk, 03.06.2024, 09:09
- Creating a CSPRNG for DOS? - SuperIlu, 02.06.2024, 14:11
- Creating a CSPRNG for DOS? - myrkraverk, 02.06.2024, 01:14
- Creating a CSPRNG for DOS? - rosegondon, 01.06.2024, 18:27