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

Extremely slow due to the underlying SHA implementation #1

Open
AntonMeep opened this issue Mar 17, 2022 · 1 comment
Open

Extremely slow due to the underlying SHA implementation #1

AntonMeep opened this issue Mar 17, 2022 · 1 comment

Comments

@AntonMeep
Copy link
Owner

Because this seems to be extremely slow compared, to say, OpenSSL. While clearly it would benefit from optimizations similar to what fastpbkdf2 uses, biggest bottleneck seems to be GNAT.SHA* modules. Ideally, I would prefer to have a separate crate for sha and hmac that would implement these algorithms in a platform-independent, portable and hopefully faster manner.

Example of a simple benchmark on 2^10 iterations:

Implementation Time (s)
PBKDF2 5.527577500
OpenSSL 1.494409900
@AntonMeep
Copy link
Owner Author

Since v2.0.0 this crate now uses other implementation of SHA and HMAC algorithms. These are still slow, however.

@AntonMeep AntonMeep changed the title Extremely slow due to GNAT.SHA* packages Extremely slow due to the underlying SHA implementation Mar 24, 2022
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

No branches or pull requests

1 participant