aboutsummaryrefslogtreecommitdiffstats
path: root/package/libs/openssl/files/openssl.init
diff options
context:
space:
mode:
authorEneas U de Queiroz <cotequeiroz@gmail.com>2023-03-10 17:21:11 -0300
committerEneas U de Queiroz <cotequeiroz@gmail.com>2023-04-05 08:24:49 -0300
commit975036f6f9c8b12fbf82854ea006b4951c5be783 (patch)
tree5a767ffb67e7be94d39280576be2248e6d84c1e3 /package/libs/openssl/files/openssl.init
parent75f7e2d10bf2a09616090d02726b15d5eb0a153b (diff)
downloadupstream-975036f6f9c8b12fbf82854ea006b4951c5be783.tar.gz
upstream-975036f6f9c8b12fbf82854ea006b4951c5be783.tar.bz2
upstream-975036f6f9c8b12fbf82854ea006b4951c5be783.zip
openssl: avoid OPENSSL_SMALL_FOOTPRINT, no-asm
Building openssl with OPENSSL_SMALL_FOOTPRINT yelds only from 1% to 3% decrease in size, dropping performance from 2% to 91%, depending on the target and algorithm. For example, using AES256-GCM with 1456-bytes operations, X86_64 appears to be the least affected with 2% performance penalty and 1% reduction in size; mips drops performance by 13%, size by 3%; Arm drops 29% in performance, 2% in size. On aarch64, it slows down ghash so much that I consider it broken (-91%). SMALL_FOOTPRINT will reduce AES256-GCM performance by 88%, and size by only 1%. It makes an AES-capable CPU run AES128-GCM at 35% of the speed of Chacha20-Poly1305: Block-size=1456 bytes AES256-GCM AES128-GCM ChaCha20-Poly1305 SMALL_FOOTPRINT 62014.44 65063.23 177090.50 regular 504220.08 565630.28 182706.16 OpenSSL 1.1.1 numbers are about the same, so this should have been noticed a long time ago. This creates an option to use OPENSSL_SMALL_FOOTPRINT, but it is turned off by default unless SMALL_FLASH or LOW_MEMORY_FOOTPRINT is used. Compiling with -O3 instead of -Os, for comparison, will increase size by about 14-15%, with no measureable effect on AES256-GCM performance, and about 2% increase in Chacha20-Poly1305 performance on Aarch64. There are no Arm devices with the small flash feature, so drop the conditional default. The package is built on phase2, so even if we include an Arm device with small flash later, a no-asm library would have to be built from source anyway. Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
Diffstat (limited to 'package/libs/openssl/files/openssl.init')
0 files changed, 0 insertions, 0 deletions