Skip to content

Adding a harness for bouncycastle-rust mldsa#8

Draft
ounsworth wants to merge 1 commit intosymbolicsoft:mainfrom
ounsworth:main
Draft

Adding a harness for bouncycastle-rust mldsa#8
ounsworth wants to merge 1 commit intosymbolicsoft:mainfrom
ounsworth:main

Conversation

@ounsworth
Copy link
Copy Markdown

Does not currently work, 57/60 tests fail with:

harness returned error: missing param 'param_set'

the req: &Request that is passed in to handle_sign() and handle_verify(), I need that to contain "param_set" so that I can switch and call MLDSA44, MLDSA65, or MLDSA87.

nadimkobeissi added a commit that referenced this pull request Apr 12, 2026
All `ML_DSA_Sign` and `ML_DSA_Verify` harness calls now include `("param_set", ps)` in their params, where `ps` is 44, 65, or 87. Previously only `ML_DSA_KeyGen` passed this parameter, and Sign/Verify passed empty params (`&[]`), forcing harness implementations to infer the parameter set from key byte lengths.

This doesn't work for libraries like Bouncy Castle Rust that have distinct types per parameter set (e.g. `MLDSA44`, `MLDSA65`, `MLDSA87`) and need the parameter set upfront to dispatch correctly. So, changed 34 call sites across all 6 battery category files. The `verify()` helper in `category4_verify.rs` gained a `p: &MlDsaParams` parameter to thread the param set through.
@nadimkobeissi
Copy link
Copy Markdown
Member

@ounsworth Could you please check if 38d44c2 helps?

@ounsworth
Copy link
Copy Markdown
Author

@nadimkobeissi Yup! That looks like it does exactly what I want! Thanks!
I'll get back on this later this week.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants