[erlang-questions] crypto:hmac/3 using hardware acceleration

Hans Nilsson R hans.r.nilsson@REDACTED
Wed May 8 12:06:17 CEST 2019

Yes it's possible to use the EVP_* functions. But it is nothing that we plan to do for the moment.

But pull-requests are always welcome :)


On Tue, 2019-05-07 at 19:19 +0300, Ben Browitt wrote:
Profiling my server with eprof show that my app spends most of the time on  crypto:hmac(sha, Key, Data) while crypto:stream_encrypt/2 using aes_ctr is much faster.

This answer [1] says that HMAC_* routines are software based and don't use hardware. The hmac nif seems to use them [2].

Is my resolution correct?
Is it possible to use EVP_* functions instead of HMAC_* functions in the nif?

[1] https://stackoverflow.com/a/20322002
[2] https://github.com/erlang/otp/blob/master/lib/crypto/c_src/hmac.c<https://protect2.fireeye.com/url?k=ff45ecfa-a3d7e1a6-ff45ac61-0cc47ad93d46-7719c85c2345896d&u=https://github.com/erlang/otp/blob/master/lib/crypto/c_src/hmac.c>


erlang-questions mailing list



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20190508/1123eb79/attachment.htm>

More information about the erlang-questions mailing list