Skip to content

Randomize contexts by default? #225

@real-or-random

Description

@real-or-random

Given that getting entropy is easy in Rust (thread_rng at least with std), we could optimistically call randomize() on every new context that we give to the user. I believe the reason why upstream doesn't do this is because it's just not clear how to obtain entropy in C.

An issue is that we'll need to disable this without std, which will be a subtle loss of security if you switch std off. Ignoring the current API, I think the proper way to do this is to let new create randomized contexts and make this only available with std, and have a verbose function new_no_randomize. But that's a pretty large API break. Hm.

If we don't want to do any of this, we should at least add randomize our examples.

Related to #224 and rust-random/rand#313.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions