Skip to content

Reject MLD_PREHASH_NONE in prehash APIs#1220

Closed
fegge wants to merge 2 commits into
pq-code-package:mainfrom
trailofbits:fix/prehash-none-message-bypass
Closed

Reject MLD_PREHASH_NONE in prehash APIs#1220
fegge wants to merge 2 commits into
pq-code-package:mainfrom
trailofbits:fix/prehash-none-message-bypass

Conversation

@fegge

@fegge fegge commented Jun 26, 2026

Copy link
Copy Markdown

Summary

  • Reject MLD_PREHASH_NONE in the unstable pre-hash signing and verification APIs.
  • Document that MLD_PREHASH_NONE is not supported by these HashML-DSA entry points.
  • Add functional coverage for the rejected pre-hash algorithm.

Validation

  • clang-format -i mldsa/src/sign.c mldsa/src/sign.h mldsa/mldsa_native.h test/src/test_mldsa.c: passed
  • git diff --check -- mldsa/src/sign.c mldsa/src/sign.h mldsa/mldsa_native.h test/src/test_mldsa.c: passed
  • make run_func -j4: passed
  • Not run: ./scripts/format because nixpkgs-fmt is not installed in this local environment
  • Not run: ./scripts/lint because shfmt is not installed in this local environment

Fixes #1215


This work was completed by Trail of Bits as part of the Patch The Planet project in collaboration with OpenAI. The issue was identified primarily by the Codex coding agent, and manually reviewed before submission.

@fegge

fegge commented Jun 26, 2026

Copy link
Copy Markdown
Author

Reopened from an upstream repository branch with DCO-signed commits so full CI can run: #1228

@fegge fegge closed this Jun 26, 2026
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.

Prehash API accepts MLD_PREHASH_NONE and ignores the digest

1 participant