Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ARM32 ChaCha20, Poly1305: assembly code #8020

Merged
merged 2 commits into from
Sep 30, 2024

Conversation

SparkiDev
Copy link
Contributor

Description

Add assembly code for ChaCha20 and Poly1305 on ARM32 when no NEON available.

Testing

How did you test?

Checklist

  • added tests
  • updated/added doxygen
  • updated appropriate READMEs
  • Updated manual and documentation

@SparkiDev SparkiDev self-assigned this Sep 26, 2024
Add assembly code for ChaCha20 and Poly1305 on ARM32 when no NEON
available.
@SparkiDev SparkiDev force-pushed the arm32_base_chacha20_poly1305 branch 2 times, most recently from beac822 to d9cd1e7 Compare September 26, 2024 13:15
@dgarske dgarske self-requested a review September 26, 2024 14:37
@dgarske dgarske self-assigned this Sep 26, 2024
Copy link
Contributor

@dgarske dgarske left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Confirmed no impact on the Thumb2 code, but did need to change which .c files were used.

Tried to test on an STM32MP135 (cortex-a7) using:

./configure --host=armv7a CC="arm-linux-gnueabi-gcc" AR="arm-linux-gnueabi-ar" RANLIB="arm-linux-gnueabi-ranlib" --enable-sp=yes,asm --enable-keygen --enable-armasm=inline --enable-keygen --enable-curve25519 --enable-ed25519 --disable-shared --enable-static --disable-dh --disable-filesystem CPPFLAGS="-DWOLFSSL_ARMASM_NO_NEON" --disable-sha3 && make

Can you share an example of how you cross-compile?

root@stm32mp1:~# uname -a
Linux stm32mp1 5.15.45 #1 SMP PREEMPT Mon Jun 6 06:43:42 UTC 2022 armv7l armv7l armv7l GNU/Linux

Note: I could not enable SHA3 without NEON:

./configure --host=armv7a CC="arm-linux-gnueabi-gcc" AR="arm-linux-gnueabi-ar" RANLIB="arm-linux-gnueabi-ranlib" --enable-sp=yes,asm --enable-keygen --enable-armasm=inline --enable-keygen --enable-curve25519 --enable-ed25519 --enable-curve448 --enable-ed448 --disable-shared --enable-static --disable-dh --disable-filesystem CPPFLAGS="-DWOLFSSL_ARMASM_NO_NEON" && make

wolfcrypt/src/port/arm/armv8-32-sha3-asm_c.c: In function 'BlockSha3':
  CC       wolfcrypt/src/src_libwolfssl_la-cpuid.lo
wolfcrypt/src/port/arm/armv8-32-sha3-asm_c.c:371:21: error: 'L_sha3_arm2_neon_rt' undeclared (first use in this function); did you mean 'L_sha3_arm2_neon_rt_c'?
  371 |         (uint64_t*)&L_sha3_arm2_neon_rt;
      |                     ^~~~~~~~~~~~~~~~~~~
      |                     L_sha3_arm2_neon_rt_c
wolfcrypt/src/port/arm/armv8-32-sha3-asm_c.c:371:21: note: each undeclared identifier is reported only once for each function it appears in

@dgarske dgarske removed their assignment Sep 26, 2024
@SparkiDev
Copy link
Contributor Author

retest this please

@SparkiDev SparkiDev assigned dgarske and unassigned SparkiDev Sep 27, 2024
@dgarske dgarske self-requested a review September 27, 2024 16:25
Copy link
Contributor

@dgarske dgarske left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

About a 30% improvement without NEON.

Run on STM32MP135 openstlinux using:

source /opt/st/stm32mp1/4.2.4-openstlinux-6.1-yocto-mickledore-mpu-v24.06.26/environment-setup-cortexa7t2hf-neon-vfpv4-ostl-linux-gnueabi
echo ${CONFIGURE_FLAGS}
--target=arm-ostl-linux-gnueabi --host=arm-ostl-linux-gnueabi --build=x86_64-linux --with-libtool-sysroot=/opt/st/stm32mp1/4.2.4-openstlinux-6.1-yocto-mickledore-mpu-v24.06.26/sysroots/cortexa7t2hf-neon-vfpv4-ostl-linux-gnueabi
./configure --prefix=$PWD/build ${CONFIGURE_FLAGS} --enable-sp=yes,asm --enable-keygen --enable-armasm=inline --enable-keygen --enable-curve25519 --enable-ed25519 --disable-shared --enable-static --disable-filesystem --enable-aesgcm=4bit --disable-aesgcm-stream CPPFLAGS="-DWOLFSSL_ARM_ARCH=7 -DWOLFSSL_ARMASM_NO_HW_CRYPTO -fomit-frame-pointer" && make

scp davidgarske@10.0.4.4:~/GitHub/wolfssl/wolfcrypt/test/testwolfcrypt .
scp davidgarske@10.0.4.4:~/GitHub/wolfssl/wolfcrypt/benchmark/benchmark .

Errors not finding the implementations for GCM_gmult_len, AES_set_encrypt_key, AES_CBC_encrypt, AES_CBC_decrypt, AES_ECB_encrypt, etc...
Due to A7 needing WOLFSSL_ARMASM_NO_HW_CRYPTO. These are in the armv8-32-aes-asm or thumb2-aes-asm.
Seems the BUILD_ARMASM_CRYPTO may not be required anymore. This patch worked for PR and master:

diff --git a/src/include.am b/src/include.am
index dbda409a2..fa182f6ad 100644
--- a/src/include.am
+++ b/src/include.am
@@ -164,13 +164,11 @@ if BUILD_ARMASM
 src_libwolfssl@LIBSUFFIX@_la_SOURCES += wolfcrypt/src/port/arm/armv8-aes.c
 endif BUILD_ARMASM
 if BUILD_ARMASM_NEON
-if !BUILD_ARMASM_CRYPTO
 if BUILD_ARMASM_INLINE
 src_libwolfssl@LIBSUFFIX@_la_SOURCES += wolfcrypt/src/port/arm/armv8-32-aes-asm_c.c
 else
 src_libwolfssl@LIBSUFFIX@_la_SOURCES += wolfcrypt/src/port/arm/armv8-32-aes-asm.S
 endif !BUILD_ARMASM_INLINE
-endif !BUILD_ARMASM_CRYPTO
 else
 if BUILD_ARMASM
 if BUILD_ARMASM_INLINE
@@ -336,13 +334,11 @@ if BUILD_ARMASM
 src_libwolfssl@LIBSUFFIX@_la_SOURCES += wolfcrypt/src/port/arm/armv8-aes.c
 endif BUILD_ARMASM
 if BUILD_ARMASM_NEON
-if !BUILD_ARMASM_CRYPTO
 if BUILD_ARMASM_INLINE
 src_libwolfssl@LIBSUFFIX@_la_SOURCES += wolfcrypt/src/port/arm/armv8-32-aes-asm_c.c
 else
 src_libwolfssl@LIBSUFFIX@_la_SOURCES += wolfcrypt/src/port/arm/armv8-32-aes-asm.S
 endif !BUILD_ARMASM_INLINE
-endif !BUILD_ARMASM_CRYPTO
 else
 if BUILD_ARMASM
 if BUILD_ARMASM_INLINE
@@ -701,7 +697,6 @@ if BUILD_ARMASM
 src_libwolfssl@LIBSUFFIX@_la_SOURCES += wolfcrypt/src/port/arm/armv8-aes.c
 endif BUILD_ARMASM
 if BUILD_ARMASM_NEON
-if !BUILD_ARMASM_CRYPTO
 if BUILD_ARMASM_INLINE
 src_libwolfssl@LIBSUFFIX@_la_SOURCES += wolfcrypt/src/port/arm/armv8-32-aes-asm_c.c
 src_libwolfssl@LIBSUFFIX@_la_SOURCES += wolfcrypt/src/port/arm/thumb2-aes-asm_c.c
@@ -709,7 +704,6 @@ else
 src_libwolfssl@LIBSUFFIX@_la_SOURCES += wolfcrypt/src/port/arm/armv8-32-aes-asm.S
 src_libwolfssl@LIBSUFFIX@_la_SOURCES += wolfcrypt/src/port/arm/thumb2-aes-asm.S
 endif !BUILD_ARMASM_INLINE
-endif !BUILD_ARMASM_CRYPTO
 else
 if BUILD_ARMASM
 if BUILD_ARMASM_INLINE

Run on STM32MP135 Cortex-A7 at 1 GHz:
Linux stm32mp1 5.15.45 #1 SMP PREEMPT Mon Jun 6 06:43:42 UTC 2022 armv7l armv7l armv7l GNU/Linux

NEON Enabled:
With PR 8020:

------------------------------------------------------------------------------
 wolfSSL version 5.7.2
------------------------------------------------------------------------------
Math: 	Multi-Precision: Wolf(SP) word-size=32 bits=3072 sp_int.c
	Single Precision: ecc 256 rsa/dh 2048 3072 asm sp_arm32.c
wolfCrypt Benchmark (block bytes 1048576, min 1.0 sec each)
RNG                         15 MiB took 1.449 seconds,   10.354 MiB/s
AES-128-CBC-enc             30 MiB took 1.142 seconds,   26.262 MiB/s
AES-128-CBC-dec             30 MiB took 1.169 seconds,   25.671 MiB/s
AES-192-CBC-enc             25 MiB took 1.135 seconds,   22.026 MiB/s
AES-192-CBC-dec             25 MiB took 1.146 seconds,   21.821 MiB/s
AES-256-CBC-enc             20 MiB took 1.047 seconds,   19.094 MiB/s
AES-256-CBC-dec             20 MiB took 1.053 seconds,   18.987 MiB/s
AES-128-GCM-enc             15 MiB took 1.192 seconds,   12.588 MiB/s
AES-128-GCM-dec             15 MiB took 1.173 seconds,   12.784 MiB/s
AES-192-GCM-enc             15 MiB took 1.248 seconds,   12.019 MiB/s
AES-192-GCM-dec             15 MiB took 1.284 seconds,   11.678 MiB/s
AES-256-GCM-enc             15 MiB took 1.371 seconds,   10.939 MiB/s
AES-256-GCM-dec             15 MiB took 1.367 seconds,   10.973 MiB/s
GMAC Table 4-bit            26 MiB took 1.012 seconds,   25.695 MiB/s
CHACHA                      65 MiB took 1.039 seconds,   62.558 MiB/s
CHA-POLY                    45 MiB took 1.085 seconds,   41.483 MiB/s
MD5                         90 MiB took 1.023 seconds,   87.949 MiB/s
POLY1305                   150 MiB took 1.018 seconds,  147.365 MiB/s
SHA                         45 MiB took 1.000 seconds,   44.983 MiB/s
SHA-256                     25 MiB took 1.082 seconds,   23.107 MiB/s
SHA-384                     20 MiB took 1.130 seconds,   17.693 MiB/s
SHA-512                     20 MiB took 1.148 seconds,   17.420 MiB/s
SHA-512/224                 20 MiB took 1.125 seconds,   17.773 MiB/s
SHA-512/256                 20 MiB took 1.130 seconds,   17.693 MiB/s
HMAC-MD5                    90 MiB took 1.047 seconds,   85.988 MiB/s
HMAC-SHA                    45 MiB took 1.031 seconds,   43.629 MiB/s
HMAC-SHA256                 25 MiB took 1.096 seconds,   22.807 MiB/s
HMAC-SHA384                 20 MiB took 1.112 seconds,   17.985 MiB/s
HMAC-SHA512                 20 MiB took 1.140 seconds,   17.537 MiB/s
PBKDF2                       3 KiB took 1.004 seconds,    2.832 KiB/s
RSA     2048  key gen         2 ops took 1.941 sec, avg 970.339 ms, 1.031 ops/sec
RSA     3072  key gen         1 ops took 11.937 sec, avg 11936.814 ms, 0.084 ops/sec
RSA     2048   public      1400 ops took 1.043 sec, avg 0.745 ms, 1342.730 ops/sec
RSA     2048  private       100 ops took 2.605 sec, avg 26.048 ms, 38.391 ops/sec
DH      2048  key gen        83 ops took 1.005 sec, avg 12.105 ms, 82.612 ops/sec
DH      2048    agree       100 ops took 1.169 sec, avg 11.689 ms, 85.552 ops/sec
ECC   [      SECP256R1]   256  key gen      1500 ops took 1.049 sec, avg 0.700 ms, 1429.496 ops/sec
ECDHE [      SECP256R1]   256    agree       700 ops took 1.034 sec, avg 1.478 ms, 676.735 ops/sec
ECDSA [      SECP256R1]   256     sign      1100 ops took 1.019 sec, avg 0.927 ms, 1079.157 ops/sec
ECDSA [      SECP256R1]   256   verify       700 ops took 1.136 sec, avg 1.623 ms, 616.056 ops/sec
CURVE  25519  key gen      1330 ops took 1.000 sec, avg 0.752 ms, 1329.853 ops/sec
CURVE  25519    agree      1400 ops took 1.008 sec, avg 0.720 ms, 1389.091 ops/sec
ED     25519  key gen      3242 ops took 1.000 sec, avg 0.308 ms, 3241.828 ops/sec
ED     25519     sign      2900 ops took 1.027 sec, avg 0.354 ms, 2822.532 ops/sec
ED     25519   verify      1200 ops took 1.042 sec, avg 0.868 ms, 1152.076 ops/sec
Benchmark complete

With master:

------------------------------------------------------------------------------
 wolfSSL version 5.7.2
------------------------------------------------------------------------------
Math: 	Multi-Precision: Wolf(SP) word-size=32 bits=3072 sp_int.c
	Single Precision: ecc 256 rsa/dh 2048 3072 asm sp_arm32.c
wolfCrypt Benchmark (block bytes 1048576, min 1.0 sec each)
RNG                         15 MiB took 1.391 seconds,   10.786 MiB/s
AES-128-CBC-enc             30 MiB took 1.155 seconds,   25.971 MiB/s
AES-128-CBC-dec             30 MiB took 1.175 seconds,   25.531 MiB/s
AES-192-CBC-enc             25 MiB took 1.207 seconds,   20.709 MiB/s
AES-192-CBC-dec             25 MiB took 1.170 seconds,   21.361 MiB/s
AES-256-CBC-enc             20 MiB took 1.013 seconds,   19.736 MiB/s
AES-256-CBC-dec             20 MiB took 1.069 seconds,   18.714 MiB/s
AES-128-GCM-enc             15 MiB took 1.146 seconds,   13.095 MiB/s
AES-128-GCM-dec             15 MiB took 1.193 seconds,   12.577 MiB/s
AES-192-GCM-enc             15 MiB took 1.281 seconds,   11.709 MiB/s
AES-192-GCM-dec             15 MiB took 1.255 seconds,   11.952 MiB/s
AES-256-GCM-enc             15 MiB took 1.389 seconds,   10.799 MiB/s
AES-256-GCM-dec             15 MiB took 1.378 seconds,   10.886 MiB/s
GMAC Table 4-bit            26 MiB took 1.005 seconds,   25.861 MiB/s
CHACHA                      65 MiB took 1.070 seconds,   60.776 MiB/s
CHA-POLY                    45 MiB took 1.064 seconds,   42.302 MiB/s
MD5                         90 MiB took 1.035 seconds,   86.922 MiB/s
POLY1305                   135 MiB took 1.020 seconds,  132.316 MiB/s
SHA                         45 MiB took 1.014 seconds,   44.377 MiB/s
SHA-256                     25 MiB took 1.065 seconds,   23.482 MiB/s
SHA-384                     20 MiB took 1.156 seconds,   17.299 MiB/s
SHA-512                     20 MiB took 1.130 seconds,   17.701 MiB/s
SHA-512/224                 20 MiB took 1.139 seconds,   17.560 MiB/s
SHA-512/256                 20 MiB took 1.140 seconds,   17.546 MiB/s
HMAC-MD5                    90 MiB took 1.013 seconds,   88.867 MiB/s
HMAC-SHA                    45 MiB took 1.051 seconds,   42.831 MiB/s
HMAC-SHA256                 25 MiB took 1.060 seconds,   23.577 MiB/s
HMAC-SHA384                 20 MiB took 1.136 seconds,   17.609 MiB/s
HMAC-SHA512                 20 MiB took 1.129 seconds,   17.718 MiB/s
PBKDF2                       3 KiB took 1.006 seconds,    2.734 KiB/s
RSA     2048  key gen         2 ops took 1.620 sec, avg 809.929 ms, 1.235 ops/sec
RSA     3072  key gen         1 ops took 11.607 sec, avg 11606.942 ms, 0.086 ops/sec
RSA     2048   public      1400 ops took 1.038 sec, avg 0.742 ms, 1348.455 ops/sec
RSA     2048  private       100 ops took 2.557 sec, avg 25.574 ms, 39.102 ops/sec
DH      2048  key gen        85 ops took 1.014 sec, avg 11.927 ms, 83.840 ops/sec
DH      2048    agree       100 ops took 1.158 sec, avg 11.584 ms, 86.327 ops/sec
ECC   [      SECP256R1]   256  key gen      1500 ops took 1.031 sec, avg 0.687 ms, 1454.654 ops/sec
ECDHE [      SECP256R1]   256    agree       700 ops took 1.020 sec, avg 1.458 ms, 686.074 ops/sec
ECDSA [      SECP256R1]   256     sign      1100 ops took 1.041 sec, avg 0.946 ms, 1057.090 ops/sec
ECDSA [      SECP256R1]   256   verify       700 ops took 1.135 sec, avg 1.621 ms, 616.716 ops/sec
CURVE  25519  key gen      1322 ops took 1.000 sec, avg 0.757 ms, 1321.611 ops/sec
CURVE  25519    agree      1400 ops took 1.018 sec, avg 0.727 ms, 1375.338 ops/sec
ED     25519  key gen      3338 ops took 1.000 sec, avg 0.300 ms, 3337.807 ops/sec
ED     25519     sign      2800 ops took 1.003 sec, avg 0.358 ms, 2792.809 ops/sec
ED     25519   verify      1200 ops took 1.043 sec, avg 0.869 ms, 1150.845 ops/sec
Benchmark complete

NEON Disabled (adding WOLFSSL_ARMASM_NO_NEON):

With PR 8020:

------------------------------------------------------------------------------
 wolfSSL version 5.7.2
------------------------------------------------------------------------------
Math: 	Multi-Precision: Wolf(SP) word-size=32 bits=3072 sp_int.c
	Single Precision: ecc 256 rsa/dh 2048 3072 asm sp_arm32.c
wolfCrypt Benchmark (block bytes 1048576, min 1.0 sec each)
RNG                         10 MiB took 1.060 seconds,    9.430 MiB/s
AES-128-CBC-enc             30 MiB took 1.129 seconds,   26.568 MiB/s
AES-128-CBC-dec             30 MiB took 1.178 seconds,   25.469 MiB/s
AES-192-CBC-enc             25 MiB took 1.135 seconds,   22.027 MiB/s
AES-192-CBC-dec             25 MiB took 1.144 seconds,   21.859 MiB/s
AES-256-CBC-enc             20 MiB took 1.044 seconds,   19.151 MiB/s
AES-256-CBC-dec             20 MiB took 1.042 seconds,   19.193 MiB/s
AES-128-GCM-enc             15 MiB took 1.179 seconds,   12.721 MiB/s
AES-128-GCM-dec             15 MiB took 1.141 seconds,   13.151 MiB/s
AES-192-GCM-enc             15 MiB took 1.294 seconds,   11.593 MiB/s
AES-192-GCM-dec             15 MiB took 1.276 seconds,   11.755 MiB/s
AES-256-GCM-enc             15 MiB took 1.350 seconds,   11.109 MiB/s
AES-256-GCM-dec             15 MiB took 1.392 seconds,   10.776 MiB/s
GMAC Table 4-bit            26 MiB took 1.037 seconds,   25.076 MiB/s
CHACHA                      50 MiB took 1.105 seconds,   45.254 MiB/s
CHA-POLY                    35 MiB took 1.009 seconds,   34.705 MiB/s
MD5                         90 MiB took 1.021 seconds,   88.160 MiB/s
POLY1305                   150 MiB took 1.043 seconds,  143.876 MiB/s
SHA                         45 MiB took 1.008 seconds,   44.646 MiB/s
SHA-256                     25 MiB took 1.214 seconds,   20.593 MiB/s
SHA-384                     15 MiB took 1.301 seconds,   11.533 MiB/s
SHA-512                     15 MiB took 1.316 seconds,   11.401 MiB/s
SHA-512/224                 15 MiB took 1.334 seconds,   11.244 MiB/s
SHA-512/256                 15 MiB took 1.307 seconds,   11.474 MiB/s
HMAC-MD5                    85 MiB took 1.031 seconds,   82.453 MiB/s
HMAC-SHA                    45 MiB took 1.026 seconds,   43.874 MiB/s
HMAC-SHA256                 20 MiB took 1.002 seconds,   19.960 MiB/s
HMAC-SHA384                 15 MiB took 1.298 seconds,   11.555 MiB/s
HMAC-SHA512                 15 MiB took 1.296 seconds,   11.576 MiB/s
PBKDF2                       2 KiB took 1.003 seconds,    2.461 KiB/s
RSA     2048  key gen         2 ops took 2.306 sec, avg 1153.152 ms, 0.867 ops/sec
RSA     3072  key gen         1 ops took 11.145 sec, avg 11145.415 ms, 0.090 ops/sec
RSA     2048   public      1400 ops took 1.026 sec, avg 0.733 ms, 1364.314 ops/sec
RSA     2048  private       100 ops took 2.546 sec, avg 25.456 ms, 39.283 ops/sec
DH      2048  key gen        84 ops took 1.003 sec, avg 11.936 ms, 83.777 ops/sec
DH      2048    agree       100 ops took 1.154 sec, avg 11.542 ms, 86.638 ops/sec
ECC   [      SECP256R1]   256  key gen      1500 ops took 1.050 sec, avg 0.700 ms, 1428.419 ops/sec
ECDHE [      SECP256R1]   256    agree       700 ops took 1.036 sec, avg 1.479 ms, 675.915 ops/sec
ECDSA [      SECP256R1]   256     sign      1100 ops took 1.030 sec, avg 0.937 ms, 1067.590 ops/sec
ECDSA [      SECP256R1]   256   verify       700 ops took 1.159 sec, avg 1.656 ms, 603.844 ops/sec
CURVE  25519  key gen      1304 ops took 1.000 sec, avg 0.767 ms, 1303.993 ops/sec
CURVE  25519    agree      1400 ops took 1.023 sec, avg 0.730 ms, 1369.016 ops/sec
ED     25519  key gen      3233 ops took 1.000 sec, avg 0.309 ms, 3232.138 ops/sec
ED     25519     sign      2500 ops took 1.008 sec, avg 0.403 ms, 2479.658 ops/sec
ED     25519   verify      1200 ops took 1.060 sec, avg 0.883 ms, 1132.210 ops/sec
Benchmark complete

With master:

------------------------------------------------------------------------------
 wolfSSL version 5.7.2
------------------------------------------------------------------------------
Math: 	Multi-Precision: Wolf(SP) word-size=32 bits=3072 sp_int.c
	Single Precision: ecc 256 rsa/dh 2048 3072 asm sp_arm32.c
wolfCrypt Benchmark (block bytes 1048576, min 1.0 sec each)
RNG                         10 MiB took 1.022 seconds,    9.783 MiB/s
AES-128-CBC-enc             30 MiB took 1.165 seconds,   25.752 MiB/s
AES-128-CBC-dec             30 MiB took 1.176 seconds,   25.502 MiB/s
AES-192-CBC-enc             25 MiB took 1.128 seconds,   22.160 MiB/s
AES-192-CBC-dec             25 MiB took 1.157 seconds,   21.600 MiB/s
AES-256-CBC-enc             20 MiB took 1.033 seconds,   19.366 MiB/s
AES-256-CBC-dec             20 MiB took 1.097 seconds,   18.223 MiB/s
AES-128-GCM-enc             15 MiB took 1.184 seconds,   12.666 MiB/s
AES-128-GCM-dec             15 MiB took 1.184 seconds,   12.665 MiB/s
AES-192-GCM-enc             15 MiB took 1.295 seconds,   11.584 MiB/s
AES-192-GCM-dec             15 MiB took 1.266 seconds,   11.844 MiB/s
AES-256-GCM-enc             15 MiB took 1.403 seconds,   10.692 MiB/s
AES-256-GCM-dec             15 MiB took 1.391 seconds,   10.781 MiB/s
GMAC Table 4-bit            26 MiB took 1.004 seconds,   25.890 MiB/s
CHACHA                      35 MiB took 1.094 seconds,   32.001 MiB/s
CHA-POLY                    30 MiB took 1.158 seconds,   25.900 MiB/s
MD5                         90 MiB took 1.036 seconds,   86.842 MiB/s
POLY1305                   130 MiB took 1.000 seconds,  129.954 MiB/s
SHA                         45 MiB took 1.025 seconds,   43.911 MiB/s
SHA-256                     25 MiB took 1.181 seconds,   21.173 MiB/s
SHA-384                     15 MiB took 1.330 seconds,   11.274 MiB/s
SHA-512                     15 MiB took 1.294 seconds,   11.595 MiB/s
SHA-512/224                 15 MiB took 1.293 seconds,   11.605 MiB/s
SHA-512/256                 15 MiB took 1.345 seconds,   11.155 MiB/s
HMAC-MD5                    90 MiB took 1.020 seconds,   88.213 MiB/s
HMAC-SHA                    45 MiB took 1.031 seconds,   43.648 MiB/s
HMAC-SHA256                 25 MiB took 1.212 seconds,   20.622 MiB/s
HMAC-SHA384                 15 MiB took 1.285 seconds,   11.677 MiB/s
HMAC-SHA512                 15 MiB took 1.305 seconds,   11.490 MiB/s
PBKDF2                       3 KiB took 1.008 seconds,    2.511 KiB/s
RSA     2048  key gen         1 ops took 2.841 sec, avg 2840.909 ms, 0.352 ops/sec
RSA     3072  key gen         1 ops took 23.651 sec, avg 23650.903 ms, 0.042 ops/sec
RSA     2048   public      1400 ops took 1.034 sec, avg 0.738 ms, 1354.219 ops/sec
RSA     2048  private       100 ops took 2.556 sec, avg 25.556 ms, 39.130 ops/sec
DH      2048  key gen        84 ops took 1.006 sec, avg 11.973 ms, 83.519 ops/sec
DH      2048    agree       100 ops took 1.191 sec, avg 11.913 ms, 83.939 ops/sec
ECC   [      SECP256R1]   256  key gen      1500 ops took 1.059 sec, avg 0.706 ms, 1416.276 ops/sec
ECDHE [      SECP256R1]   256    agree       700 ops took 1.066 sec, avg 1.523 ms, 656.727 ops/sec
ECDSA [      SECP256R1]   256     sign      1100 ops took 1.028 sec, avg 0.934 ms, 1070.103 ops/sec
ECDSA [      SECP256R1]   256   verify       600 ops took 1.019 sec, avg 1.698 ms, 588.944 ops/sec
CURVE  25519  key gen      1364 ops took 1.000 sec, avg 0.733 ms, 1363.598 ops/sec
CURVE  25519    agree      1400 ops took 1.036 sec, avg 0.740 ms, 1351.904 ops/sec
ED     25519  key gen      3288 ops took 1.000 sec, avg 0.304 ms, 3287.816 ops/sec
ED     25519     sign      2500 ops took 1.016 sec, avg 0.406 ms, 2461.282 ops/sec
ED     25519   verify      1200 ops took 1.067 sec, avg 0.889 ms, 1124.509 ops/sec
Benchmark complete

@dgarske dgarske assigned SparkiDev and unassigned dgarske Sep 27, 2024
Generated ARM32 assembly files no longer have lines with more than 80
characters.
@SparkiDev
Copy link
Contributor Author

Diff applied

@SparkiDev SparkiDev assigned dgarske and unassigned SparkiDev Sep 30, 2024
@dgarske dgarske merged commit 47add7e into wolfSSL:master Sep 30, 2024
137 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants