Skip to content

Lowercase hex in ML-DSA sign seed test vectors#219

Merged
cpu merged 3 commits intoC2SP:mainfrom
sgmenda:fix-case
Feb 25, 2026
Merged

Lowercase hex in ML-DSA sign seed test vectors#219
cpu merged 3 commits intoC2SP:mainfrom
sgmenda:fix-case

Conversation

@sgmenda
Copy link
Contributor

@sgmenda sgmenda commented Feb 19, 2026

ML-DSA sign seed test vectors use uppercase hex, inconsistent with the rest of the repo.

Lowercases privateSeed hex values in mldsa_{44,65,87}_sign_seed_test.json.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license and the ISC license.

@sgmenda sgmenda self-assigned this Feb 19, 2026
@cpu
Copy link
Member

cpu commented Feb 19, 2026

This seems reasonable to me, but also like something that might be nice to enforce in CI. WDYT?

cpu added 2 commits February 24, 2026 12:39
The json-schema package we're using will already prefix validation
errors with the value that failed validation. This commit removes the
value from the errors we produce in custom validators to avoid
duplicating it in output.
@cpu
Copy link
Member

cpu commented Feb 24, 2026

cpu added 2 commits 4 minutes ago

I pushed two small tool update commits to add CI verification that hex bytes format values are lowercase. Hope you don't mind!

Example output from applying the updated linter to this branch with 7d30358 reverted:
2026/02/24 12:43:33 ❌ "testvectors_v1/mldsa_87_sign_seed_test.json": vector doesn't validate with schema: jsonschema validation failed with 'file:///home/daniel/Code/Misc/wycheproof/schemas/mldsa_sign_seed_schema.json#'
- at '/testGroups/8/privateSeed': '0D58219132746BE077DFE821E9F8FD87857B28AB91D6A567E312A73E2636032C' is not valid HexBytes: invalid non-lowercase HexBytes value
- at '/testGroups/9/privateSeed': '146C47AB9F88408EB76A813294D533B29D7E0FDA75DA5A4E7C69EB61EFEEBB78' is not valid HexBytes: invalid non-lowercase HexBytes value
- at '/testGroups/10/privateSeed': '049D9B0B646A2AC7F50B63CE5E4BFE44C9B87634F4FF6C14C513E388B8A1F808' is not valid HexBytes: invalid non-lowercase HexBytes value
- at '/testGroups/11/privateSeed': '9823DDDE446A8EA883DAD3AC6477F79839FDC2D2DEF2416BE0A8B71CFBC3F5C6' is not valid HexBytes: invalid non-lowercase HexBytes value
- at '/testGroups/12/privateSeed': 'AE213FE8589B414F53780D8B9B6837179967E13CB474C5AD365C043778D2BC90' is not valid HexBytes: invalid non-lowercase HexBytes value
- at '/testGroups/13/privateSeed': 'B5C07ECEFE9E7C3B885FDEF032BDF9F807B4011E2DFE6806C088D2081631C8EB' is not valid HexBytes: invalid non-lowercase HexBytes value
- at '/testGroups/14/privateSeed': 'E8FC3C9FAD711DDA2946334FBBD331468D6E9AB48EB86DCD03F300A17AEBC5E5' is not valid HexBytes: invalid non-lowercase HexBytes value
- at '/testGroups/15/privateSeed': '151F80886D6CE8C3B428964FE02C40CA0C8EFFA100EE089E54D785344FCCF719' is not valid HexBytes: invalid non-lowercase HexBytes value
- at '/testGroups/16/privateSeed': '48BEFFB4C97E59E474E1906F39888BE5AE62F6A011C05EF6A6B8D1E54F2171B7' is not valid HexBytes: invalid non-lowercase HexBytes value
- at '/testGroups/17/privateSeed': 'FE2DA9DD93A077FCB6452AC88D0A5762EB896BAAAC6CE7D01CB1370BA8322390' is not valid HexBytes: invalid non-lowercase HexBytes value

@cpu cpu merged commit 0a84a6f into C2SP:main Feb 25, 2026
4 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.

2 participants