Re: [openssl-dev] MD5 speed

2017-01-30 Thread Andy Polyakov
> I had some surprising results of the speed command when testing the
> md5 speed on the 1.1.0-stable branch (for both a shared and a static
> build):
> openssl speed md5 returns:
> type 16 bytes 64 bytes256 bytes   1024 bytes   8192 bytes 
>  16384 bytes
> md5 115869.46k   268237.29k   473617.41k   589905.92k   
> 636772.35k   639429.29k
> 
> openssl speed -evp md5 returns:
> type 16 bytes 64 bytes256 bytes   1024 bytes   8192 bytes 
>  16384 bytes
> md5  53991.08k   160454.36k   364985.86k   537559.38k   
> 624238.59k   633066.84k
> 
> On the other hand, with 1.0.1 and 1.0.2-stable using a static build I get:
> md5  38045.25k   123423.76k   310729.30k   505120.09k   620333.74k
> md5  43182.80k   135651.38k   331369.48k   518042.97k   622193.32k
> 
> Using a shared build I get:
> md5  57529.01k   169850.56k   376685.74k   545938.09k   626952.87k
> md5  65634.19k   186133.65k   397608.96k   558070.78k   629697.19k
> 
> So was surprised me is that speed for small packets seems to be a
> lot better in 1.1.0 when not using the EVP interface, but worse when
> using it compared to 1.0.2. It this expected behaviour?

Yes. In 1.1.0 speed md5 calls MD5() directly, as result 1.1.0 speed md5
is always faster than speed -evp md5 [for smaller inputs]. And in 1.0.x
speed md5 invokes EVP_Digest(...,EVP_get_digestbyname("md5"),...) in
inner loop, while speed -evp md5 effectively takes EVP_get_digestbyname
out of inner loop, so that -evp md5 is faster.

As for variations between static vs. shared. Is your operating frequency
variable? What I'm hinting at is that bringing a shared library into
address space means some additional computations, and adaptive frequency
increase is likely to kick in earlier, which would [positively] affect
first column. But second column should be same, and it's not... Another
possibility is relative position of pieces of code modulo cache size. I
mean differences might be side effect of cache contention, which are
relatively diminishing with input length.

> Sha1 doesn't seem to have this difference for instance.

Well, compare sha256 vs. -evp sha256 in 1.0.2 then :-)

-- 
openssl-dev mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-dev


Re: [openssl-dev] MD5 speed

2017-01-29 Thread Michael Sierchio
On Sun, Jan 29, 2017 at 10:53 PM, Peter Waltenberg 
wrote:

>
> No one cares ?.


I was rather thinking the same thing. Pretty much the same deprecated
status for SHA1, too.

Want to talk about poly1305?

- M
-- 
openssl-dev mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-dev


Re: [openssl-dev] MD5 speed

2017-01-29 Thread Peter Waltenberg
 No one cares ?.I'd suggest you check for alignment issues first as that tends to dominate at small block sizes.The no one cares is only partly in jest as MD5 is dead, but not yet buried. And in the grand scheme of things even a 2:1 performance hit on 16 byte blocks is unlikely to change the world.Peter-"openssl-dev"  wrote: -To: openssl-dev@openssl.orgFrom: Kurt Roeckx Sent by: "openssl-dev" Date: 01/30/2017 08:35AMSubject: [openssl-dev] MD5 speedI had some surprising results of the speed command when testing themd5 speed on the 1.1.0-stable branch (for both a shared and a staticbuild):openssl speed md5 returns:type             16 bytes     64 bytes    256 bytes   1024 bytes   8192 bytes  16384 bytesmd5             115869.46k   268237.29k   473617.41k   589905.92k   636772.35k   639429.29kopenssl speed -evp md5 returns:type             16 bytes     64 bytes    256 bytes   1024 bytes   8192 bytes  16384 bytesmd5              53991.08k   160454.36k   364985.86k   537559.38k   624238.59k   633066.84kOn the other hand, with 1.0.1 and 1.0.2-stable using a static build I get:md5              38045.25k   123423.76k   310729.30k   505120.09k   620333.74kmd5              43182.80k   135651.38k   331369.48k   518042.97k   622193.32kUsing a shared build I get:md5              57529.01k   169850.56k   376685.74k   545938.09k   626952.87kmd5              65634.19k   186133.65k   397608.96k   558070.78k   629697.19kSo was surprised me is that speed for small packets seems to be alot better in 1.1.0 when not using the EVP interface, but worse whenusing it compared to 1.0.2. It this expected behaviour?Sha1 doesn't seem to have this difference for instance.Kurt-- openssl-dev mailing listTo unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-dev

-- 
openssl-dev mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-dev


[openssl-dev] MD5 speed

2017-01-29 Thread Kurt Roeckx
I had some surprising results of the speed command when testing the
md5 speed on the 1.1.0-stable branch (for both a shared and a static
build):
openssl speed md5 returns:
type 16 bytes 64 bytes256 bytes   1024 bytes   8192 bytes  
16384 bytes
md5 115869.46k   268237.29k   473617.41k   589905.92k   636772.35k  
 639429.29k

openssl speed -evp md5 returns:
type 16 bytes 64 bytes256 bytes   1024 bytes   8192 bytes  
16384 bytes
md5  53991.08k   160454.36k   364985.86k   537559.38k   624238.59k  
 633066.84k

On the other hand, with 1.0.1 and 1.0.2-stable using a static build I get:
md5  38045.25k   123423.76k   310729.30k   505120.09k   620333.74k
md5  43182.80k   135651.38k   331369.48k   518042.97k   622193.32k

Using a shared build I get:
md5  57529.01k   169850.56k   376685.74k   545938.09k   626952.87k
md5  65634.19k   186133.65k   397608.96k   558070.78k   629697.19k

So was surprised me is that speed for small packets seems to be a
lot better in 1.1.0 when not using the EVP interface, but worse when
using it compared to 1.0.2. It this expected behaviour?

Sha1 doesn't seem to have this difference for instance.


Kurt

-- 
openssl-dev mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-dev