3 ms·
On the other hand, using the system cryptographic RNG (/dev/urandom, CryptGenRandom) is probably less effort than it took to write this strange half-baked RNG.
by MrRadar 8y ago
On the other hand, using the system cryptographic RNG (/dev/urandom, CryptGenRandom) is probably less effort than it took to write this strange half-baked RNG.
- deleted 8y ago[deleted]
- shittyadmin 8y agoYup, if you want to see the state of the art in this, here it is from libsodium: https://github.com/jedisct1/libsodium/blob/master/src/libsodium/randombytes/sysrandom/randombytes_sysrandom.c#L335 https://github.com/jedisct1/libsodium/blob/master/src/libsod... They sum it up in their docs like this: - On Windows systems, the RtlGenRandom() function is used - On OpenBSD and Bitrig, the arc4random() function is used - On recent Linux kernels, the getrandom system call is used - On other Unices, the /dev/urandom device is used
- loeg 8y agoIt seems they use getrandom() on FreeBSD too: # if defined(__FreeBSD_version) && __FreeBSD_version >= 1200000 # include <sys/random.h> # define HAVE_LINUX_COMPATIBLE_GETRANDOM
- chasil 8y agoThis likely happened because 7-zip is Windows-centric, and the p7zip packages for UNIXish systems are assembled afterwards.
- int_19h 8y agoCryptGenRandom first appeared in WinXP. And 7-Zip first shipped in 1999. Granted, AES support was only added in 2003, but the app still had to run on Win2K and 9x back then.