[erlang-questions] crypto:hmac/3 using hardware acceleration
Wed May 8 13:15:51 CEST 2019
I've tested the speed with and without evp. evp is slower because Intel
cpus don't have hardware acceleration for sha.
So it's best to leave it without evp for now. Thanks.
openssl speed sha1
openssl speed -evp sha1
On Wed, May 8, 2019 at 1:06 PM Hans Nilsson R <hans.r.nilsson@REDACTED>
> 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  says that HMAC_* routines are software based and don't use
> hardware. The hmac nif seems to use them .
> Is my resolution correct?
> Is it possible to use EVP_* functions instead of HMAC_* functions in the
>  https://stackoverflow.com/a/20322002
>  https://github.com/erlang/otp/blob/master/lib/crypto/c_src/hmac.c
> erlang-questions mailing list
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the erlang-questions