Repository navigation
Remove x86/x86_64 BSAES and AES_ASM support [1.1.1] - #9675
bernd-edlinger wants to merge 2 commits into
Conversation
This leaves VPAES and AESNI support. The VPAES performance is comparable but BSAES is not completely constant time. There are table lookups using secret key data in AES_set_encrypt/decrypt_key and in ctr mode short data uses the non-constant time AES_encrypt function instead of bit-slicing. Furthermore the AES_ASM is by far outperformed by recent GCC versions. Since BSAES calls back to AES_ASM for short data blocks the performance on those is also worse than the pure software implementaion. Fixes: openssl#9640
|
Do we know what would be the performance with older compilers or even better at least roughly which oldest gcc version produces performance that is on-par with the BSAES and AES_ASM? |
|
The comment in aes-x86_64.pl says |
|
Is this something for the upcoming release? |
|
I wonder, has anyone done a corresponding comparison with an MSVC build? |
|
Could you do that? |
|
the numbers are much better with 1.1.1 than with master, but that is another story. |
|
Sure |
VC-WIN64A + NASM, OPENSSL_ia32cap=0:0aes-128-ctraes-128-cbcaes-128-gcmVC-WIN64A no-asmaes-128-ctraes-128-cbcaes-128-gcmWow, that was quite noticable! Not extremely for gcm, but the other two? This is, btw, with MSVC 19.00.24225.1 and NASM 2.13.03 where applicable. I expect VC-WIN32 to show similar differences |
|
VC-WIN32 numbers turned out to be similarly dramatic aes-128-ctrNASM, OPENSSL_ia32cap=0:0no-asmaes-128-cbcNASM, OPENSSL_ia32cap=0:0no-asmaes-128-gcmNASM, OPENSSL_ia32cap=0:0no-asm |
This leaves VPAES and AESNI support. The VPAES performance is comparable but BSAES is not completely constant time. There are table lookups using secret key data in AES_set_encrypt/decrypt_key and in ctr mode short data uses the non-constant time AES_encrypt function instead of bit-slicing. Furthermore the AES_ASM is by far outperformed by recent GCC versions. Since BSAES calls back to AES_ASM for short data blocks the performance on those is also worse than the pure software implementaion. Fixes: #9640 Reviewed-by: Richard Levitte <[email protected]> (Merged from #9675)
|
Merged to 1.1.1 as 87bea65. Thanks! |
aes_asm and bsaes_asm were deleted in openssl/openssl#9675 Note: mandatory check (NEED_CHECK) was skipped ref:ec484ba009043fde9a2faa081d4cf341bc76c241
This leaves VPAES and AESNI support.
The VPAES performance is comparable but BSAES is not
completely constant time. There are table lookups
using secret key data in AES_set_encrypt/decrypt_key
and in ctr mode short data uses the non-constant
time AES_encrypt function instead of bit-slicing.
Furthermore the AES_ASM is by far outperformed
by recent GCC versions.
Since BSAES calls back to AES_ASM for short
data blocks the performance on those is also
worse than the pure software implementaion.
Fixes: #9640
Checklist