AES: use EVP functions instead of deprecated functions#133
AES: use EVP functions instead of deprecated functions#133ArnaudBienner wants to merge 4 commits into
Conversation
|
@ArnaudBienner, What is the cpu count for your benchmark? |
4 cores, this runs only on one core (either the old version or the new one with one with my patch) as asdcplib is not multithreaded. |
|
@ArnaudBienner, What is the cpu you are using? (so we can make sure we're using the same instruction set). |
I tried on Intel CPU: in this case openssl uses AES-NI instructions set. The information about whether or not AES-NI is available for a given processor is available on Intel website. So using a modern Intel CPU, which has AES-NI, you should be able to see a difference in performance between the old and new implementation. AFAICT all recent Intel CPU now have AES-NI. Note that it is also possible to deactivate the hardware acceleration in openssl through environment variable. For instance, to disable Intel AES-NI you can do before executing It's likely using openssl EVP functions provides other acceleration for other type of CPU (e.g. ARM) but I didn't test those. |
|
Small updates: replace deprecated function + check memory allocation failures + merge master |
Among other things, they use hardware acceleration (like AES-NI) which brings a significant performance improvement.
From my tests on an Intel CPU, this makes unwrapping of encrypted MXF ~20x faster.
I started to look at the HMAC part too, but it looks like it is already using hardware acceleration and it didn't bring any performance improvement, so I didn't updated that part for now, despite the functions being deprecated too.