Skip to content

Split MLKEM schemas + vector files by test group type#199

Merged
cpu merged 3 commits intoC2SP:mainfrom
cpu:cpu-split-mlkem
Dec 8, 2025
Merged

Split MLKEM schemas + vector files by test group type#199
cpu merged 3 commits intoC2SP:mainfrom
cpu:cpu-split-mlkem

Conversation

@cpu
Copy link
Member

@cpu cpu commented Dec 1, 2025

This is a replacement for #192 with a few tweaks:

  1. I went with a different naming convention (mlkem_encaps_test_schema.json and mlkem_test_schema.json for the schemas, mlkem_$SIZE_encaps_test.json and mlkem_$SIZE_test.json for the test files).
  2. I reduced the flags/notes in each test file to just those that are in-use.
  3. I updated CONTRIBUTING.md with guidance on splitting files by test type.
  4. I updated vectorlint so CI will catch any violations of this property in the future.

Thanks to @dingxiangfei2009 for getting the ball rolling on this. 🙇

Resolves #191

@cpu cpu self-assigned this Dec 1, 2025
@cpu cpu requested review from davidben and sgmenda December 1, 2025 19:41
@FiloSottile
Copy link
Member

I'd argue that a mlkem_keygen_and_decaps_test also tests encaps, so they can just be called mlkem_test. It's the encaps ones that are special/limited.

cpu added 3 commits December 1, 2025 15:17
* Splits the unified schema into two instances, one tailored for general
  MLKEM and one tailored to encaps.
* Splits the mlkem test data files into two based on the above schemas.
  Care is taken to make sure only applicable note flags are carried
  over.
@cpu cpu force-pushed the cpu-split-mlkem branch from e56737f to 00f797a Compare December 1, 2025 20:18
@cpu
Copy link
Member Author

cpu commented Dec 1, 2025

I'd argue that a mlkem_keygen_and_decaps_test also tests encaps, so they can just be called mlkem_test. It's the encaps ones that are special/limited.

Fair point! I've reworked as suggested.

Copy link
Contributor

@sgmenda sgmenda left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, thank you very much.

@cpu cpu merged commit 7a774c9 into C2SP:main Dec 8, 2025
1 check 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.

ML-KEM tests have multiple test types in one file

3 participants