Skip to content

Conversation

@SparkiDev
Copy link
Contributor

Description

Improve performance of CFB and OFB.
Only have one implementation that is used by OFB encrypt and decrypt.

Update AES testing in unit.test.

Update benchmarking of CFB and OFb to include decrypt.

Testing

Regression tested AES.

Checklist

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

@SparkiDev SparkiDev self-assigned this Oct 16, 2025
@devin-ai-integration
Copy link
Contributor

🛟 Devin Lifeguard found 2 likely issues in this PR

  • limit-stack-usage snippet: Convert the large local buffers (e.g. plain/cipher/decrypted in test_wc_AesEcbEncryptDecrypt_WithKey) to heap allocations guarded by WOLFSSL_SMALL_STACK (malloc/free) or reuse a single static buffer to keep per-function stack usage under 100 bytes.
  • limit-stack-usage snippet: Apply the WOLFSSL_SMALL_STACK pattern in the test functions (e.g. allocate plain, cipher, and decrypted with XMALLOC/XFREE instead of fixed-size local arrays) so each stack frame uses well under 100 bytes.

@SparkiDev
please take a look at the above issues which Devin flagged. Devin will not fix these issues automatically.

@SparkiDev SparkiDev force-pushed the aes_cfb_ofb_improv branch 5 times, most recently from dc8670a to 16aa1fc Compare October 20, 2025 01:32
@SparkiDev
Copy link
Contributor Author

Small stack respected in new test_aes.c code.

@SparkiDev SparkiDev force-pushed the aes_cfb_ofb_improv branch 9 times, most recently from 7b02d27 to dcec9e0 Compare October 20, 2025 06:32
@SparkiDev SparkiDev assigned wolfSSL-Bot and unassigned SparkiDev Oct 20, 2025
@SparkiDev SparkiDev requested a review from wolfSSL-Bot October 20, 2025 07:26
@dgarske dgarske force-pushed the aes_cfb_ofb_improv branch from dcec9e0 to e710575 Compare October 20, 2025 16:15
dgarske
dgarske previously approved these changes Oct 20, 2025
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.

I resolved the merge conflict and approve.

Copy link
Contributor

@JacobBarthelmeh JacobBarthelmeh left a comment

Choose a reason for hiding this comment

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

Nice improvements! I have a minor concern about pervious ports working with the additional sanity check though.

@SparkiDev
Copy link
Contributor Author

Removed check and removed tests for NULL.
Rebased.

Improve performance of CFB and OFB.
Only have one implementation that is used by OFB encrypt and decrypt.

Update AES testing in unit.test.

Update benchmarking of CFB and OFb to include decrypt.
@JacobBarthelmeh JacobBarthelmeh merged commit 58e3706 into wolfSSL:master Oct 22, 2025
258 of 261 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.

4 participants