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

Use seed as private key #58

Merged
merged 5 commits into from
Oct 21, 2024
Merged

Use seed as private key #58

merged 5 commits into from
Oct 21, 2024

Conversation

bwesterb
Copy link
Collaborator

@bwesterb bwesterb commented Oct 21, 2024

  • Add text that we use seed as private key
  • Add examples for all three parameter sets.
  • Deduplicate.

example/ML-KEM-512.priv Outdated Show resolved Hide resolved
example/ML-KEM-768.priv Outdated Show resolved Hide resolved
example/ML-KEM-768.priv Outdated Show resolved Hide resolved
example/ML-KEM-512.priv Outdated Show resolved Hide resolved
@seanturner
Copy link
Collaborator

I can decode the .pub examples, but none of the .priv examples. I am getting "Length over 48 bits not supported at position 1."

@bwesterb bwesterb mentioned this pull request Oct 21, 2024
@bwesterb bwesterb force-pushed the bas/better-examples branch from 12bf9be to f0b8e93 Compare October 21, 2024 21:02
@bwesterb bwesterb changed the title Improve examples Use seed as private key Oct 21, 2024
@bwesterb
Copy link
Collaborator Author

I can decode the .pub examples, but none of the .priv examples. I am getting "Length over 48 bits not supported at position 1."

Not sure what issue you hit, but I updated the examples because I noticed I didn't replace the private key by the seed yet 😬.

Copy link
Collaborator

@seanturner seanturner left a comment

Choose a reason for hiding this comment

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

I can decode these just fine. Will add the ASN.1 pretty prints via another PR.

Will look to do a Certificate we get the ML-DSA I-D closer to done.

@bwesterb bwesterb merged commit e618216 into main Oct 21, 2024
2 checks passed
Comment on lines +253 to +254
An ML-KEM private key is encoded by storing its 64-octet seed in
the privateKey field as follows.
Copy link
Contributor

Choose a reason for hiding this comment

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

I agree with using the 64-byte seed, but technically, a FIPS 203-compliant ML-KEM private key is / can be either a 64-byte seed or the fully expanded decapsulation key format; in this phrase, what is the meaning of 'is'? The ML-KEM in use in this document? Or the ML-KEM in FIPS 203? (Making this harmonious with the next paragraph would help)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Strictly speaking this sentence could be removed from the standard. It's here as a stepping stone to the precise definition. We could add a marker like "essentially" or "in short".

Copy link
Contributor

Choose a reason for hiding this comment

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

Cool, went with 'in short': #68

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.

3 participants