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

CSPRG comparison #120

Open
sinui0 opened this issue Apr 27, 2024 · 0 comments
Open

CSPRG comparison #120

sinui0 opened this issue Apr 27, 2024 · 0 comments
Labels

Comments

@sinui0
Copy link
Collaborator

sinui0 commented Apr 27, 2024

Recently we added a PRG based on AES-128 in counter-mode, which should be quite performant due to hardware acceleration. However, there was not any discussion on the trade-offs compared to using ChaCha(8/12/20).

Local benchmarks on my machine indicate that our new AES PRG has the same performance as rand_chacha::ChaCha8Rng and is roughly 50% faster than ChaCha12. I haven't gone looking for figures on which ChaCha variant is most appropriate in terms of security level to compare with AES.

We should also consider the difference for targets without hardware acceleration available (WASM).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant