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

Add missing k256 kat_tests #67

Draft
wants to merge 15 commits into
base: unstable-k256
Choose a base branch
from

Conversation

DanGould
Copy link

@DanGould DanGould commented Aug 11, 2024

Known Answer Tests are missing in the original k256 implementation on the unstable-k256 branch.

There are a couple of things to solve in order to get them in here.

  1. The original test-vectors-5f503c5.json generated from the reference implementation do not include known answers for k256 since it is not defined in RFC 9080
  2. the k256 draft is missing test vectors for encryptions and exported values
  3. The draft test vectors seem to have errors. skRm and skSm are the identical but ikmS and ikmR from which they are derived (afaiu) are different as discussed in hpke-rs h/t @franziskuskiefer for discovering this.

I'm working on generating test vectors and having another implementation test them as well.

@DanGould
Copy link
Author

I believe adding this test brings k256 up to feature parity with the others. Is anything else blocking it from being merged into main as a feature? Linking to the secp256k1 DHKEM author's note on why it probably will not make it into an RFC even though it's ready for action.

Eventually it's possible that IETF would publish the secp256k1-kem draft as
an RFC, but as far as I can tell that's somewhat rarely done for things like
this because the overhead of publishing RFCs is high and this has already
been vetted by the original RFC's authors.

@DanGould DanGould marked this pull request as draft August 14, 2024 20:29
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.

1 participant