AntonMeep / pbkdf2

ISC License
0 stars 0 forks source link

Extremely slow due to the underlying SHA implementation #1

Open AntonMeep opened 2 years ago

AntonMeep commented 2 years ago

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 commented 2 years ago

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