Using OneRNG to affect Windows entropy

redneonglow danq at runbox.com
Wed Aug 22 05:33:37 BST 2018


I don't put TPMs in any computer I build, and on my Windows computer I played with no-TPM Bitlocker for a while, but it was just obnoxious, and risky given that you can't get anything off of it if the disk starts failing, unlike LUKS with any Linux LiveCD.

Personally I'm more interested in combining sources together (OneRNG, TrueRNGpro, audio-entropyd, and would do RdRand side by side if rngd would let me) rather than limiting myself to the OneRNG on grounds of its open nature. All of those four devices get entropy from different sources (white noise and radio reception, white noise only, stereo mix, and heat).

I also like to edit old games, like older roguelikes, to use the Linux syscall getrandom, rather than seeding with time and/or getpid like those old games usually do. Usually there are no problems, if there are you can just use values taken from syscall getrandom as the seed. Depending on the game things can get pretty wacky.

Anyway here's the batch file. As you can see doing stuff like this in a packed executable with no window can raise suspicion of malware. However, it's the only way I was able to get it to work properly with Task Scheduler. Alternately, you can do it once every time you start Windows, running from the same directory WinOneRNG's filegen is in. (cat and tr come from the GnuWin32 coreutils package.)

filegen com5 /n 10 /s 1
cat 1.bin | tr -dc a-zA-Z0-9 > 1.e
setx ONERNG1 /f 1.e /a 0,0
cat 2.bin | tr -dc a-zA-Z0-9 > 2.e
setx ONERNG2 /f 2.e /a 0,0
cat 3.bin | tr -dc a-zA-Z0-9 > 3.e
setx ONERNG3 /f 3.e /a 0,0
cat 4.bin | tr -dc a-zA-Z0-9 > 4.e
setx ONERNG4 /f 4.e /a 0,0
cat 5.bin | tr -dc a-zA-Z0-9 > 5.e
setx ONERNG5 /f 5.e /a 0,0
cat 6.bin | tr -dc a-zA-Z0-9 > 6.e
setx ONERNG6 /f 6.e /a 0,0
cat 7.bin | tr -dc a-zA-Z0-9 > 7.e
setx ONERNG7 /f 7.e /a 0,0
cat 8.bin | tr -dc a-zA-Z0-9 > 8.e
setx ONERNG8 /f 8.e /a 0,0
cat 9.bin | tr -dc a-zA-Z0-9 > 9.e
setx ONERNG9 /f 9.e /a 0,0
cat 10.bin | tr -dc a-zA-Z0-9 > 10.e
setx ONERNG0 /f 10.e /a 0,0
del 1.bin
del 2.bin
del 3.bin
del 4.bin
del 5.bin
del 6.bin
del 7.bin
del 8.bin
del 9.bin
del 10.bin
del 1.e
del 2.e
del 3.e
del 4.e
del 5.e
del 6.e
del 7.e
del 8.e
del 9.e
del 10.e


More information about the Discuss mailing list