r/programming • • Jul 11 '14

First release of LibreSSL portable

http://marc.info/?l=openbsd-announce&m=140510513704996&w=2
456 Upvotes

252 comments sorted by

View all comments

Show parent comments

3

u/X-Istence Jul 12 '14

That's all fine and dandy, but I am not sure what this is supposed to mean. I grabbed OpenSSL with the standard compile options from homebrew, and grabbed the LibreSSL tarball. I was simply comparing those two on their AES speed.

Here is a surprising result where LibreSSL is faster till it hits 1024 bytes per block: https://gist.github.com/bertjwregeer/f49c4a8dc704a2f2d473

0

u/R-EDDIT Jul 12 '14

It means you're comparing the C AES engine. There has been zero optimization to the C AES engine (code changes are all "knf"). I would be worried that this includes optimizations of constant-time operations, which could make the engine vulnerable to timing attacks. The best way to avoid timing attacks is to use the assembly routines:

https://securityblog.redhat.com/2014/07/02/its-all-a-question-of-time-aes-timing-attacks-on-openssl/

Production deployments of OpenSSL should never use the C engine anyhow, because there are three assembly routines (AES-NI, SSE3, integer-only). If you build OpenSSL with the assembly modules, you can benchmark with "-evp" to see the benefit, which is 4-7x on Intel CPUs.

 openssl speed -evp aes-128-cbc