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

Wed May 8 15:34:17 CEST 2019

On 2019年5月8日水曜日 14時15分51秒 JST Ben Browitt wrote:
> 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

I think it depends on how your openssl was built and which processor
family you have. IIRC Intel has SHA1 hardware support, and AMD has
SHA1 and SHA256 hardware instructions since RyZen.

May also depend on if you are running virtualized and whether the
hypervisor is exposing the instructions.

In the base case I imagine it would "just work", but not if this is
disabled in a vanilla Linux/BSD/whatever distribution binary, or if
your system is set to a mode that restricts some instructions.


More information about the erlang-questions mailing list