Skip to content

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

@euantorano

Description

@euantorano

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions