Skip to content

nxp hashcrypt: preserve AES OFB/CFB streaming state across calls - #11262

Open
night1rider wants to merge 1 commit into
wolfSSL:masterfrom
night1rider:fenrir-8259
Open

nxp hashcrypt: preserve AES OFB/CFB streaming state across calls#11262
night1rider wants to merge 1 commit into
wolfSSL:masterfrom
night1rider:fenrir-8259

Conversation

@night1rider

Copy link
Copy Markdown
Contributor

Drive OFB/CFB from the ECB primitive with reg/tmp/left kept in the Aes context, add NULL/zero-length guards, and re-enable the streaming regression checks.

@night1rider night1rider self-assigned this Aug 25, 2026
@wolfSSL-Bot

Copy link
Copy Markdown

Can one of the admins verify this patch?

Drive OFB/CFB from the ECB primitive with reg/tmp/left kept in the Aes context, add NULL/zero-length guards, and re-enable the streaming regression checks.
Copilot AI lite review requested due to automatic review settings August 27, 2026 03:34

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the NXP HASHCRYPT AES port to correctly maintain OFB/CFB streaming state across multiple calls by generating keystream from the ECB primitive and persisting reg/tmp/left in the Aes context. It also re-enables previously-disabled regression checks to verify correct streaming behavior.

Changes:

  • Rework NXP HASHCRYPT AES OFB/CFB to be stateful across calls using per-block ECB keystream generation stored in the Aes context.
  • Add NULL argument guards and explicit zero-length fast-path returns for the new OFB/CFB implementations.
  • Remove #ifndef WOLFSSL_NXP_HASHCRYPT_AES skips in AES OFB/CFB streaming regression checks so the tests run for the NXP port again.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
wolfcrypt/src/port/nxp/hashcrypt_port.c Implements stateful OFB/CFB using ECB keystream blocks and persisted context state (reg/tmp/left) to preserve streaming across calls.
wolfcrypt/test/test.c Re-enables OFB/CFB streaming regression comparisons for WOLFSSL_NXP_HASHCRYPT_AES now that the port preserves state correctly.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

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