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-dsa: revisit key encoding #908

Open
baloo opened this issue Feb 20, 2025 · 5 comments
Open

ml-dsa: revisit key encoding #908

baloo opened this issue Feb 20, 2025 · 5 comments

Comments

@baloo
Copy link
Member

baloo commented Feb 20, 2025

In the light of https://keymaterial.net/2025/02/19/how-not-to-format-a-private-key/ we might need to revisit the way we encode (or at least decode) the private keys.

#891
#892

@baloo
Copy link
Member Author

baloo commented Feb 20, 2025

For now, this implementation complies with the draft RFC: https://datatracker.ietf.org/doc/draft-ietf-lamps-dilithium-certificates/, but that might change in the future?

https://groups.google.com/a/list.nist.gov/g/pqc-forum/c/fxoRYGVmbRw/

@tarcieri
Copy link
Member

See also: RustCrypto/KEMs#53

@baloo
Copy link
Member Author

baloo commented Mar 20, 2025

@tarcieri
Copy link
Member

tarcieri commented Mar 20, 2025

That certainly is an obnoxious key format, I guess due to backwards compatibility with implementations who started using those encodings without first discussing how they should work.

Well, we should definitely support the seed-only format. The others seem like less of a priority (I really don't see the point of the "both" encoding if the expanded key can be deterministically derived from the seed).

@baloo
Copy link
Member Author

baloo commented Mar 20, 2025

I guess that would be to import a key exported by HSM or another very inflexible source.

I would go with deserialize from any of the format, and serialize to either seed or expanded (if we got expanded to begin with).

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

No branches or pull requests

2 participants