-
Notifications
You must be signed in to change notification settings - Fork 5
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
Add test vectors #96
Add test vectors #96
Conversation
632acff
to
848ab2b
Compare
Thanks for providing the test vectors!
If you don't have the time to fix points 3 and 4, I can provide the v6 key + v6 PKESK/v2 SEIPD as well, just let me know. intermediate values that I currently print for the encrypted message to the v4 key:
|
|
a268daf
to
0e7d97a
Compare
I ended up removing the checksum everywhere, they are test vectors anyway |
0e7d97a
to
c1a9ab5
Compare
Thanks, this looks good to me! I can process all the non-ML-DSA keys and messages and get the same intermediate outputs. ML-DSA I can't process since I don't have it. Just a few minor things:
|
a9f9f42
to
357cab5
Compare
can i discourage you from using references to Golang in the user ID? it makes the test vector seem implementation-specific, and the goal of a test vector is promoting cross-implementation interoperability. (not the end of the world if it slips into some version of the draft, but it'd be better to avoid it) |
Let me review the purpose of the v4 EdDSALegacy+PQ/T test vector (
In summary, this test vector represents a "compromise key" that is supposed to interoperate with legacy implementations, while also being usable by fully up-to-date implementations in 2024 that encrypt with the best-known mechanisms. If that's the goal, then i draw the following conclusions:
Test vectors have a way of setting defacto standards, and it would be great to start off with something as close to what we think implementations should be generating as possible. Having the "compromise key" test vector be as plausible as possible will also help us to evaluate whether it actually serves the "compromise" purpose or not, by testing using it with legacy implementations (similar to the interop test suite's "Mock PQ Subkey" test). It's possible that my three requests above aren't the only things needed to make a good "compromise key". Can you update this test vector to be as close as possible to what you think would be a plausible "compromise key"? |
That's not exactly true. There is the possibility to leave out v6 keys, v6 PKESK and v2 SEIPD entirely (parsing and generating), but to include PQ/T encryption.
That's exactly the point, yes.
Agreed. Our intent was to add an ECDH subkey, good that you noticed that it's missing here. The timestamp thing is an interesting idea. We should add this to the migration considerations (if we think it's useful, might as well not have an impact at all).
I agree. |
@TJ-91 wrote:
Sure, but i think the goal should be interoperating with actual legacy software, not interoperating with an implementer practicing deliberate avoidance. There is no way to interoperate with an implementer who is trying to not interoperate, so there is no point in targeting them. And the v6 key and sig formats, and v2 SEIPD are now stable, well-specified, and simple to implement compared with anything like ML-KEM. |
Okay, I'll do the following changes to the vectors:
Regarding
Note that in the spec we explicitly state
Not setting an earlier date can also be a test for this case. |
I'm not sure whether it's helpful to frame it like this. Trying to not interoperate is not the same as waiting until everything plays out (see e.g. Kai Engerts views on this). Anyway, I think it'll not make much difference: If a legacy implementation is interoperable, then also a "v4-PQC-only" implementation can manage to be interoperable.
Good point. Anyway, I think we shouldn't rush the timestamp thing. Let's properly discuss this, it's not crucial for the test vectors now. |
357cab5
to
c513de9
Compare
I ended up doing:
@TJ-91 PR should be ready and rebased on main. Can you please check if the artifacts are correct on your side? @dkg do you see any further issue with the keys? @falko-strenzke @fluppe2 as agreed I removed the (unverified) vectors for ML-DSA. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can import and decrypt the test vectors. The subpackets look good to me and I checked some of the intermediate output, which also looks good to me 👍
Add test vectors for