uuids icon indicating copy to clipboard operation
uuids copied to clipboard

`urandom` module doesn't check that /dev/urandom is a valid random device

Open euantorano opened this issue 6 years ago • 0 comments

The urandom module doesn't currently check that the /dev/urandom file is actually a source of random data. It should check that the file handle is a character device as is done in this example module: https://github.com/euantorano/sysrandom.nim/blob/master/src/sysrandom.nim#L118

Additionally, the urandom module currently uses CryptGenRandom on Windows. It may be easier to use RtlGenRandom instead. It may also make sense to use arc4random_buf on openBSD systems as its use is encouraged there

euantorano avatar Nov 29 '17 16:11 euantorano