Add support for Intel AES-NI instruction set
http://sourceforge.net/tracker/?func=detail&aid=3008234&group_id=38894&atid=423802
Does NSS or OpenSSL have support for AES-NI ?
Yes, it is supported in OpenSSL as part of the EVP layer
Yes, this works with the OpenSSL integration code that I submitted a few weeks ago. We've tested this and the performance improvement is significant, depending on the payload size. We've also done work to support AES-GCM mode. With this mode, we no longer need the SHA calculation. Hence, the performance benefit is even greater. The OpenSSL GHash implementation supports the Intel carry-less multiply operation to improve performance.
Looking forward to test it. Can you make a pull request or put here a link to the patch?
Regarding AES-GCM, in the profiling of our app with real audio+video traffic the SHA calculation is apparently as expensive as the AES calculation so AES-GCM could be a great addition.
I've created the pull request. Keep in mind that Cullen has already started to integrate the code into the feature-openssl branch.
The feature-openssl branch is now working. Here are the timing results from the cipher_driver test with and with-out the OpenSSL code enabled:
OpenSSL 1.0.1 w/AES-NI: timing AES-128 counter mode using openssl throughput, key length 30: msg len: 32 gigabits per second: 0.948148 msg len: 64 gigabits per second: 1.969231 msg len: 128 gigabits per second: 3.200000 msg len: 256 gigabits per second: 6.400000 msg len: 512 gigabits per second: 10.240000 msg len: 1024 gigabits per second: 15.170370 msg len: 2048 gigabits per second: 19.275294 timing AES-256 counter mode using openssl throughput, key length 46: msg len: 32 gigabits per second: 0.882759 msg len: 64 gigabits per second: 1.765517 msg len: 128 gigabits per second: 2.925714 msg len: 256 gigabits per second: 5.535135 msg len: 512 gigabits per second: 8.533333 msg len: 1024 gigabits per second: 12.412121 msg len: 2048 gigabits per second: 15.456604
Legacy: timing aes integer counter mode throughput, key length 30: msg len: 32 gigabits per second: 1.163636 msg len: 64 gigabits per second: 1.219048 msg len: 128 gigabits per second: 1.219048 msg len: 256 gigabits per second: 1.233735 msg len: 512 gigabits per second: 1.241212 msg len: 1024 gigabits per second: 1.248780 msg len: 2048 gigabits per second: 1.248780 timing aes integer counter mode throughput, key length 46: msg len: 32 gigabits per second: 0.882759 msg len: 64 gigabits per second: 0.898246 msg len: 128 gigabits per second: 0.906195 msg len: 256 gigabits per second: 0.910222 msg len: 512 gigabits per second: 0.916331 msg len: 1024 gigabits per second: 0.909212 msg len: 2048 gigabits per second: 0.907198
Closing this issue since libsrtp now supports AES-NI via OpenSSL.
Hello, how can I enable AES-NI through libsrtp API ? From what version is it supported?
Thanks in advance!!
Configure libsrtp with the --enable-openssl option. You'll need OpenSSL 1.0.1 or newer. AES-NI will automatically be enabled by OpenSSL if your chipset supports it.
OK, so it is quite simple ;). Thanks!!
how i test it,and check srtp is use AES-NI or not?