pq-code-package / tsc

PQ Code Project Technical Steering Committee resources
https://pq-code-package.github.io/tsc/
Creative Commons Attribution 4.0 International
4 stars 4 forks source link

ML-KEM Test Vectors #29

Open ashman-p opened 3 months ago

ashman-p commented 3 months ago

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 commented 3 months ago

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 commented 3 months ago

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 commented 3 months ago

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 commented 2 months ago

@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 commented 2 months ago

In https://github.com/open-quantum-safe/liboqs/issues/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 commented 2 months ago

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 commented 2 months ago

There's a draft for the test vectors here https://github.com/C2SP/wycheproof/pull/110.

planetf1 commented 2 months ago

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 commented 2 months ago

@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 commented 1 month ago

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.