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

Performance improvements #8445

Merged
merged 1 commit into from
Feb 14, 2025
Merged

Performance improvements #8445

merged 1 commit into from
Feb 14, 2025

Conversation

SparkiDev
Copy link
Contributor

@SparkiDev SparkiDev commented Feb 12, 2025

Description

AES-GCM: don't generate M0 when using assembly unless falling back to C and then use new assembly code.
HMAC: add option to copy hashes (--enable-hash-copy -DWOLFSSL_HMAC_COPY_HASH) to improve performance when using the same key for multiple operations.

Testing

./autogen.sh
./configure '--disable-shared' '--enable-intelasm' '--enable-aesgcm-stream' '--enable-hmac-copy'
./wolfcrypt
./wolfcrypt/test/testwolfcrypt
./wolfcrypt/benchmark/benchmark -base10 -hmac-sha256 -mac_final 16
(AES-GCM improvement seen with wolfProvider and openssl speed -aead -evp aes-128-gcm)

Turned off use_aesni after generating the M0 table and used each variant of assembly code.

Checklist

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

AES-GCM: don't generate M0 when using assembly unless falling back to C
and then use new assembly code.
HMAC: add option to copy hashes (--enable-hash-copy
-DWOLFSSL_HMAC_COPY_HASH) to improve performance when using the same key
for multiple operations.
Copy link
Contributor

@douzzer douzzer left a comment

Choose a reason for hiding this comment

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

tested locally with sanitizer-all-intelasm-c-fallback-fuzzer wolfsm-all-gcc-latest all-linuxkm-defaults-max-total-stack-8k linuxkm-all-cryptonly-intelasm-LKCAPI-insmod-mainline-fallback-fuzzing

@douzzer douzzer merged commit e806bd7 into wolfSSL:master Feb 14, 2025
174 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.

3 participants