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 #13

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

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

elagergren-spideroak opened this issue Jan 7, 2025 · 0 comments · May be fixed by aranya-project/aranya-core#44
Assignees

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 referenced this issue in aranya-project/aranya-core Jan 7, 2025
Fixes #43

Signed-off-by: Eric Lagergren <[email protected]>
@elagergren-spideroak elagergren-spideroak self-assigned this Jan 8, 2025
elagergren-spideroak referenced this issue in aranya-project/aranya-core Jan 9, 2025
Fixes #43

Signed-off-by: Eric Lagergren <[email protected]>
@elagergren-spideroak elagergren-spideroak transferred this issue from aranya-project/aranya-core Jan 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant