uncategorized

Preliminary cryptographic benchmarks on new Apple A12Z Bionic Platform

wolfSSL is up and running and tested on Apple’s new A12Z platform, and with the right options it is blazing fast! The key options that we benchmarked include our out of the box defaults vs some key optimizations described below. Some notes to help you decipher these benchmarks:

SP is Single Precision Math. It is a wolfSSL developed math library that is extremely well optimized for ARM environments and cryptographic math calculations. SP ASM is the assembly component of the SP math library. ARMASM is the assembly code functionality provided by ARM. As many of our savvy readers know, we have the best support for ARMv8 cryptography extensions, and they work great! MB/Sec is the number of megabytes of data that you can encrypt or decrypt per second. If you have big files to encrypt/decrypt, then you will really enjoy the power of SP math and the ARMv8 cryptography extensions! This is our first pass of optimizations for these benchmarks. We’ll do more, and we expect that a few more passes of optimizations will yield 20% to 40% more performance on any given cipher.

See below for more details!

Algorithm Throughput (Default Options, MB/sec, higher is faster) Throughput (SP + SP ASM + ARM ASM, MB/sec, higher is faster))
RNG 69.21 512.621
AES-128-CBC-enc 228.03 1102.22
AES-128-CBC-dec 255.75 6407.078
AES-256-CBC-enc 171.38 848.61
AES-256-CBC-dec 185.67 4103.814
AES-GCM-128-enc 55.067 1344.808
AES-GCM-128-dec 55.04 729.65
AES-256-GCM-enc 51 1350.216
AES-256-GCM-dec 50.967 708.081
CHACHA 305.358 1284.298
CHA-POLY 256.692 907.553
MD5 405.448 405.685
POLY1305 1616.658 3099.69
SHA 453.143 587.883
SHA-256 151.601 1831.661
HMAC-MD5 405.415 405.678
HMAC-SHA 452.972 576.566
HMAC-SHA256 151.556 1831.624
HMAC-SHA512 302.308 367.16
Algorithm Throughput (Default Options, ms/op, lower is faster) Throughput (SP + SP ASM + ARM ASM, ms/op, lower is faster)
RSA 2048 Pub 0.612 0.022
RSA 2048 Priv 6.274 0.722
DH 2048 Key Gen 1.339 0.338
DH 2048 Key Agree 2.008 0.338
ECC 256 Key Gen 2.554 0.022
ECC 256 Key Agree 2.54 0.061
EC-DSA Sign 2.653 0.034
EC-DSA Verify 1.76 0.073

To enable SP + SP ASM + ARM ASM and achieve maximum performance on Apple’s A12Z, pass in the following options to configure: ./configure --host=aarch64-apple-darwin --enable-sp --enable-sp-asm --enable-armasm Note that the host flag is only required if the host is not detected as aarch64 by default. Check config.log after running configure to confirm this.

If you have any questions or run into any issues, contact us at facts@wolfssl.com, or call us at +1 425 245 8247.