Crypto timings

Eric S. Raymond esr at thyrsus.com
Sun Jan 29 13:12:41 UTC 2017


Hal Murray <hmurray at megapathdsl.net>:
> 
> This is computing the digest for a password and a 48 byte packet, then 
> dropping it on the floor.
> 
> The "old" version uses EVP_DigestInit, like the current code in ntpd.
> The new version uses EVP_DigestInit_ex and a static context.
> 
> 
> Intel(R) Core(TM) i3-2120 CPU @ 3.30GHz
> 
> 1000000 MD5 encrypts took 0.476 microseconds each
> 1000000 old SHA1 encrypts took 0.435 microseconds each
> 1000000 SHA1 encrypts took 0.308 microseconds each
> 
> 
> RPi 2
> 
> 1000000 MD5 encrypts took 5.686 microseconds each
> 1000000 old SHA1 encrypts took 6.979 microseconds each
> 1000000 SHA1 encrypts took 4.379 microseconds each

I'm not sure we care a lot about this performance gain, given that
SHA-1 use seems to be uncommon. But the change seems simple enough and
would only need to be done in two places. Would it change the floor
version of OpenSSL we can use?
-- 
		<a href="http://www.catb.org/~esr/">Eric S. Raymond</a>


More information about the devel mailing list