Closed somoza closed 2 years ago
Hey @somoza, this is def the right place to ask this kind of questions :).
At the time I wrote this, there was only a C based Nif that wasn't maintained anymore. From what I could research there was no pure Erlang implementation. Maybe that's changed now ?
In terms of benchmark, I don't think we need to compare Erlang with Rust on those operations. Rust would probably be orders of magnitude faster.
Thanks for tour answer! I found that BCrypt.base module uses the Erlang crypto.erl
May this do the work?
If so, I would be glad to help on building a prototype using the Erlang library, and besides, compare both with some benchmarking.
Yes, the bcrypt_elixir
lib does use the native crypto module. Erlang crypto does includes sha3
, but that won't help with this as the final padding is different and results in a different hash. I supposed one could take the native implementation and change the padding.
Yup, you're right. I'm not an Erlang programmer but I will try to add this to the Erlang OTP anyway. Thanks!
It depends on the OpenSSL release (Erlang uses its apis), so we have to wait. The other option is to program it on pure erlang as someone did on Rust ^^
https://github.com/openssl/openssl/issues/19304#issuecomment-1263230431
Sorry for the use issues for this... Please close it as soon you answer me.
I'm just curious... Why did you use rust for this and not native erlang? Did you make some benchmarks or something to make this decision?