<div dir="ltr"><div>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.</div><div><br></div><div>This answer [1] says that HMAC_* routines are software based and don't use hardware. The hmac nif seems to use them [2].

</div><div dir="ltr"><br></div><div dir="ltr">Is my resolution correct?</div><div dir="ltr">Is it possible to use EVP_* functions instead of HMAC_* functions in the nif?</div><div dir="ltr"><br>[1] <a href="https://stackoverflow.com/a/20322002">https://stackoverflow.com/a/20322002</a><br>[2] <a href="https://github.com/erlang/otp/blob/master/lib/crypto/c_src/hmac.c">https://github.com/erlang/otp/blob/master/lib/crypto/c_src/hmac.c</a><br></div></div>