Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ML-KEM Test Vectors #29

Open
ashman-p opened this issue Mar 12, 2024 · 13 comments
Open

ML-KEM Test Vectors #29

ashman-p opened this issue Mar 12, 2024 · 13 comments

Comments

@ashman-p
Copy link

This a request to create a repo for ML-KEM test vectors.
A potential source is https://github.com/C2SP/CCTV/tree/main/ML-KEM pending how the CC0 license check works out.

It is likely that there could multiple sources.

@planetf1
Copy link
Contributor

I think we need to resolve the CC0 license, also I note that repo currently doesn't have any license quoted.

Given that unknown, do we have any content we can (pending approval) put in a repo yet?

@ashman-p
Copy link
Author

Still looking into it. I sent a note to Douglas and Sophie (who sent the vectors).
Her vectors are expected to be added in Wycheproof but was unable to find a link.

@dstebila
Copy link
Contributor

Did we get clear answer on whether the test vectors need to be Apache 2 or CC0?

Apparently Mozilla recommends that test cases be licensed CC0:

Trivial bits of Mozilla Code, such as test cases or snippets of code used in documentation, should be put in the public domain in order to facilitate re-use.

@planetf1, Sophie Schmieg is at conference activities this week, so if we have a clear question to her about licensing we can put it to her this week.

@planetf1
Copy link
Contributor

planetf1 commented Apr 9, 2024

@dstebila @ashman-p were you able to get any update from Sophie about licensing?

Has anything changed in the current source for licenses that we'd like to use?

Is the first link in this issue still the preferred source?

@planetf1
Copy link
Contributor

planetf1 commented Apr 9, 2024

In open-quantum-safe/liboqs#1740, there's a discussion about using these test vectors in CI, which seems to be concluding (very appropriately) that these test vectors can simply be used in CI.

My understanding in this issue was that there was a desire to start assembling a collection of test vectors within pq-code-package itself -- and this is where the licensing becomes more problematic since we're effectively redistributing the test vectors (and maybe changing etc).

@dstebila
Copy link
Contributor

I wasn't able to talk to Sophie about this during the conference activities, so we'll need to reach out to her by email.

@franziskuskiefer
Copy link

There's a draft for the test vectors here C2SP/wycheproof#110.

@planetf1
Copy link
Contributor

Is it sufficient to simply refer to (docs/readme) and use (in tests) this repo, rather than maintaining a derived version here? (this comment was also made in OQS). Or perhaps the pq-cp repo is just scripts that facilitate pulling down consistent versions of a variety of test vector courses (rather than managing the test vectors themselves)?

On original point - Looking at license, it seems to all be Apache 2.0 now.

@ashman-p
Copy link
Author

@dstebila @ashman-p were you able to get any update from Sophie about licensing?

Has anything changed in the current source for licenses that we'd like to use?

Is the first link in this issue still the preferred source?

I got no response to the email i sent.

@ashman-p
Copy link
Author

ashman-p commented May 9, 2024

This serves as an alternative proposal for accessing test vectors for ML-KEM and future ML-DSA.
The proposal is to create a test harness that interfaces to NIST's demo test server which creates test vectors for various algorithms. This would allow various checks for compliance with the appropriate standards.

The harness connects to the NIST server, registers the algorithm and capabilities to test. The test server in response generates test vectors which are delivered to the unit under test. Test results to the corresponding session are returned to the server which the server gives an assessment.

We have the option of storing the test vectors and reuse them for static (KAT-like) tests.
Please give feedback on the idea.
Where would such a harness be stored? In its own repo?
This would require some input from the LF because it would need credentials for connecting to NIST.
I will reach out the Ry and Naomi in parallel concerning credentials needed.

@planetf1 planetf1 moved this to Backlog in TSC tracking Jun 17, 2024
@mkannwischer
Copy link
Contributor

Is there any update regarding this topic?

If not, then I think I'll try to test against the static testvectors in https://github.com/usnistgov/ACVP-Server/tree/master/gen-val/json-files/ML-KEM-encapDecap-FIPS203. We can get that integrated into the https://github.com/pq-code-package/mlkem-c-aarch64 project first, and see from there how we can generalize for all remaining projects. Any thoughts?

@planetf1
Copy link
Contributor

I'm not aware of anything, other than the fact that liboqs are looking at the final ML-KEM & testing against the latest testvectors ML-DSA & ML-KEM: integrate final standards

@mkannwischer
Copy link
Contributor

Thanks for the pointer. We can borrow it from there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Backlog
Development

No branches or pull requests

5 participants