thiagomajesk

thiagomajesk

Trouble finding Whirlpool implementations

Cheers everyone!

I’m finding incredibly hard to find a Whirlpool2 hashing implementation. Could someone point me in the right direction?

I couldn’t find an Elixir library that supports it so far and the closest I got to finding something useful was the C, Go and Ruby (C wrapper) versions.

PS.: I received this specification from the owner of a platform I have to integrate with and I need to generate password hashes in the same way his service does. I couldn’t find references for “Whirlpool2” exactly, so I’m guessing is the second revision of the algorithm (Whirlpool-T).

Most Liked

hauleth

hauleth

Pure Elixir implementation will be pretty slow. Your best choice is to use NIF. OpenSSL do not support Whirlpool IIRC so you either need to use C library or you can check out other languages “closer to the metal” languages like Zig or Rust.

Long time ago I have been working on crypto library in Rust (maybe some day I will go back to that) and I have implemented Whirlpool hash function as well:

https://github.com/libOctavo/octavo/blob/master/digest/src/whirlpool/mod.rs

You can check that out and maybe provide NIF for that via Rustler.

Where Next?

Popular in Questions Top

Qqwy
Original source of discussion: This topic on the Pragmatic Programmers’ Functional Web Development with Elixir, OTP, and Phoenix forum. ...
New
ashish173
I am using Ecto timestamps with postgres, I can see the timestamps() use the :naive_dateime but for my use case I wanted to store the ti...
New
stefanchrobot
What’s the safe way to decode a JSON string into a struct? I want to avoid calling String.to_atom. Jason.decode can give me a map with st...
New
9mm
I am constructing a JSON object (map) and I need to conditionally set a field. I’m trying to write proper elixir-way code… and I’m at a l...
New
sen
Hi All, I set a environment variables in dev.exs , like below code. when i start server, how can i set the ${enable} value? thanks. d...
New
fireproofsocks
Forgive me if this is obvious, but how does one delete a database record WITHOUT selecting it first? Ecto.Repo — Ecto v3.14.0 has exampl...
New
vrod
I am using the Starship cross-shell prompt – it seems pretty nice, but I get some errors: [WARN] - (starship::utils): Executing command ...
New

Other popular topics Top

grych
Hi folks, Few months ago I have announced the proof-of-concept of the library to manipulate the browsers DOM objects directly from Elixi...
639 54092 488
New
vonH
In asking this question I am more interested about the expressiveness of the language itself and less concerned about the availability of...
New
nsuchy
Hi. I’ve noticed that Windows Powershell has it’s own IEX command and you cannot access Elixir’s IEX due to the conflict. This isn’t a cr...
New
dogweather
I wrote this comment on r/haskell, and it’s not popular there. :wink: But I think I’m on to something… Haskell reminds me of Java, and e...
New
siddhant3030
Hi, I have to write a raw query for one of my project. But till now I have used ecto queries and don’t have much experience writing raw ...
New
sergio
Kind of like when jquery came out, it was super necessary. Existing drag and drop libraries have a bunch of baggage to support old browse...
New

We're in Beta

About us Mission Statement