Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

crypto: get rid of rand::ThreadRng usage #43

Open
elagergren-spideroak opened this issue Jan 7, 2025 · 0 comments · May be fixed by #44
Open

crypto: get rid of rand::ThreadRng usage #43

elagergren-spideroak opened this issue Jan 7, 2025 · 0 comments · May be fixed by #44
Assignees
Labels
crypto (hopefully) really difficult math

Comments

@elagergren-spideroak
Copy link
Member

At compile time, Rng selects one of:

  • A thread-local (ish) user space fast key erasure ChaCha8 CSPRNG if trng is enabled, or
  • ThreadRng if std is enabled, or
  • getrandom if getrandom is enabled, or
  • extern "C" fn crypto_getrandom(...) otherwise

I'm not exactly a fan of user space CSPRNGs. The ChaCha8 trng CSPRNG is unavoidable, but ThreadRng isn't. We should probably get rid of it.

@elagergren-spideroak elagergren-spideroak added the crypto (hopefully) really difficult math label Jan 7, 2025
elagergren-spideroak added a commit that referenced this issue Jan 7, 2025
Fixes #43

Signed-off-by: Eric Lagergren <[email protected]>
@elagergren-spideroak elagergren-spideroak linked a pull request Jan 7, 2025 that will close this issue
@elagergren-spideroak elagergren-spideroak self-assigned this Jan 8, 2025
@elagergren-spideroak elagergren-spideroak linked a pull request Jan 8, 2025 that will close this issue
elagergren-spideroak added a commit that referenced this issue Jan 9, 2025
Fixes #43

Signed-off-by: Eric Lagergren <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
crypto (hopefully) really difficult math
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant