[erlang-questions] hmac sha256 erlang
Fri May 6 15:38:28 CEST 2011
On Fri, May 6, 2011 at 4:00 AM, Paolo Negri <paolo.negri@REDACTED> wrote:
> Dear list
> I did some research on google and I would like to assess the state of
> the implementation of sha2 in erlang.
> It seems that such functions are not present in the standard crypto
> module, and that instead one public implementation is available at
> I would like to know if anyone is using this module in production and
> if it's stability has been proven.
It passes all test vectors I've thrown at it. If you find any that
don't work, please let me know.
The code has been around for several years, originally just served off
my website. The original version was pure Erlang, which proved to be
too slow for most, but a number of people have emailed me over the
years saying they were using it because speed wasn't an issue for
them. That original code is still present in the github repo as the
fallback implementations for the NIFs, which are the newest part of
the github version. The NIFs are basically C translations of the
original Erlang code, and so are operationally the same, though of
course I paid special attention to avoiding the usual problems you get
in C with pointer problems and buffer overflows. The C code is also
much faster of course -- on my 4+ year old MBPro it takes 28 seconds
to run the test suite without the NIFs, 0.75 seconds with the NIFs.
If you have any problems with it, just let me know.
More information about the erlang-questions