ExWeb3 / ex_keccak

Elixir library for computing Keccak SHA3-256 hashes using a NIF built tiny-keccak Rust crate.
Apache License 2.0
25 stars 20 forks source link

remove Rust and support C NIF #15

Closed camquyt23 closed 3 years ago

camquyt23 commented 3 years ago

Maybe this version is simple than rust NIF

tzumby commented 3 years ago

Hey @foll0wer, thanks for your PR. There's already a C-based library out there: https://github.com/potatosalad/erlang-keccakf1600

I think we want to keep this one in Rust. @ayrat555 did point out that this is a lot slower than erlang-keccakf1600. One thing I would like to try is swapping the tiny-keccak with keccak-hash (this is what OpenEthereum uses) and run the benchmarks. I haven't had the time to do this yet.

ayrat555 commented 3 years ago

@foll0wer I think you can create a new NIF library. It will be useful for many people (who don't want to drag Rust) Because it seems https://github.com/potatosalad/erlang-keccakf1600 is not maintained anymore and it doesn't support new versions of OTP

tzumby commented 3 years ago

@foll0wer I think you can create a new NIF library. It will be useful for many people (who don't want to drag Rust) Because it seems https://github.com/potatosalad/erlang-keccakf1600 is not maintained anymore and it doesn't support new versions of OTP

Agreed, I ended up pushing a patched version for one of those OTP versions. A new NIF lib based on C would definitely see lots of use

tzumby commented 3 years ago

@foll0wer, thanks for your PR, but based on our previous comments I will close this PR