Skip to content

Document that TFM APIs disallow even moduli - #12196

Merged
JacobBarthelmeh merged 1 commit into
wolfSSL:masterfrom
holtrop-wolfssl:zd-22801
Nov 20, 2026
Merged

JacobBarthelmeh merged 1 commit into
wolfSSL:masterfrom
holtrop-wolfssl:zd-22801

Conversation

@holtrop-wolfssl

Copy link
Copy Markdown
Contributor

Description

Document that TFM APIs disallow even moduli

Comment-only change.

Fixes ZD#22801.

Testing

How did you test?

Checklist

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

@holtrop-wolfssl holtrop-wolfssl self-assigned this Nov 19, 2026
Copilot AI balanced review requested due to automatic review settings November 19, 2026 21:27

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.

🟢 Approval recommended

No active review issues are reported for this comment-only clarification of TFM modulus requirements.

No open issues 🎉

What changed in this PR

This comment-only PR clarifies odd-modulus requirements for wolfCrypt’s TFM APIs. It does not change runtime behavior.

Changes:

  • Documents even-modulus errors for Montgomery setup and modular exponentiation, including trivial-case exceptions.
  • Corrects the fp_exptmod implementation comment to describe exponentiation rather than multiplication.
File Description
wolfssl/​wolfcrypt/​tfm.h Documents modulus restrictions and error behavior for TFM APIs.
wolfcrypt/​src/​tfm.c Corrects the formula in the fp_exptmod comment.

Review effort: Balanced

@github-actions

github-actions Bot commented Nov 19, 2026 •

Copy link
Copy Markdown

MemBrowse Memory Report · Explore what changed →

zephyr-frdm_rw612

  • FLASH: datas +16 B, log_const_area -8 B, rodata +108 B, text +13,496 B (+4.8%, 296,076 B / 67,108,864 B, total: 0% used)
  • RAM: bss +49 B, datas +16 B (+0.1%, 58,423 B / 983,040 B, total: 6% used)

No memory changes detected for:


Catch memory regressions in CI with MemBrowse. Free for open source.

@JacobBarthelmeh
JacobBarthelmeh merged commit e0b592d into wolfSSL:master Nov 20, 2026
450 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