Skip to content

sm4.c: use the common GHASH path for SM4-GCM on ARM assembly builds - #37

Open
SparkiDev wants to merge 1 commit into
wolfSSL:masterfrom
SparkiDev:sm4_gcm_arm
Open

SparkiDev wants to merge 1 commit into
wolfSSL:masterfrom
SparkiDev:sm4_gcm_arm

Conversation

@SparkiDev

Copy link
Copy Markdown
Contributor

Fix the SM4-GCM usage of GMULT().
Fix sm4_gcm_calc_h too.

@SparkiDev SparkiDev self-assigned this Oct 8, 2026
Copilot AI balanced review requested due to automatic review settings October 8, 2026 07:36
@SparkiDev

Copy link
Copy Markdown
Contributor Author

PR for:
wolfSSL/wolfssl#11689

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Changes recommended

The affected ARM assembly path lacks automated coverage for the corrected GHASH behavior.

1 open finding
What changed in this PR

Updates SM4-GCM to use the common GHASH implementation consistently across ARM assembly and other builds.

Changes:

  • Keeps the GCM hash key unreflected.
  • Removes redundant ARM-specific GMULT() operations.
  • Uses common GHASH logic for nonce and tag calculations.
File Description
sm4.c Corrects SM4-GCM hash-key setup and GHASH usage.

🧠 Review effort: Balanced


Give feedback about Copilot approvals in this survey to enter a drawing for a $150 gift card.

Comment thread sm4.c
Fix the SM4-GCM usage of GMULT().
Fix sm4_gcm_calc_h too.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🔵 Needs a closer look

The cryptographic representation changes are coherent and covered by new CI, but warrant final human validation across supported wolfSSL versions.

0 open findings

1 resolved since last review

🧠 Review effort: Balanced

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