Repository navigation
Sign a 64-byte mu in testAllSigs for ML-DSA-*-extmu - #36
Merged
Merged
Conversation
liboqs enables ML-DSA-44-extmu, ML-DSA-65-extmu and ML-DSA-87-extmu by default. They sign an externally computed 64-byte mu rather than an arbitrary message, and reject any other message length. testAllSigs signed the same 27-byte message with every enabled algorithm, so it failed for these three, and mvn package failed against liboqs main. Sign a 64-byte mu for the extmu variants, as liboqs's own test_sig.c does. Signed-off-by: Douglas Stebila <dstebila@uwaterloo.ca> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Nov 2, 2026
An all-zero mu would not catch the wrapper passing a zeroed buffer to liboqs instead of the caller's bytes. Use random bytes, as liboqs's test_sig.c does. Signed-off-by: Douglas Stebila <dstebila@uwaterloo.ca> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Member
Author
|
@jimouris Do you have still have an interest in liboqs-java? If so, there is this and two other PRs making some updates that I would appreciate a review on. |
Member
|
Hi @dstebila, for sure. I'll check all three of them soon! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
CI builds against liboqs
main, which enables ML-DSA-44-extmu, ML-DSA-65-extmu and ML-DSA-87-extmu by default. These variants sign an externally computed 64-byte μ rather than an arbitrary message, and liboqs rejects any other message length.testAllSigssigns the same 27-byte message with every enabled algorithm, so these three cases fail, and so doesmvn package.This PR signs a random 64-byte μ for algorithms whose name ends in
-extmu, as liboqs's owntests/test_sig.cdoes. Only the test changes.Testing
Tested locally on macOS (arm64, JDK 27) against liboqs
main(8c41c85).mvn packagepasses with 317 tests and 0 errors, wheremasterhas 3 errors, and the examples compile.On
master, these failures show up as anArrayIndexOutOfBoundsExceptionwith a garbage length rather thanRuntimeException: Cannot sign message, becausesignleaves the signature length uninitialized when signing fails. #37 fixes that.🤖 Generated with Claude Code