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 support for hybrid forward secrecy (hfs) modifier #2

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

jchambers
Copy link
Owner

This takes a crack at implementing the hybrid forward secrecy (hfs) modifier as described in the draft Noise HFS specification as of 025f0f60.

This whole thing is built on a slightly shaky foundation in that the HFS modifier specification is still very much a draft and leaves some important details (what are the acceptable cipher suites? what are their names? how does this interact with the fallback modifier?) up for discussion. I've done my best to make reasonable decisions on my own, but recognize that reasonable minds may disagree with some of them.

The Java ecosystem still doesn't—yet!—have well-established patterns for KEMs yet. I think the interpretation provided in kyberJCE makes sense, but recognize it may change as KEMs (and post-quantum cryptography more broadly) gain better adoption in the JDK. I also couldn't find a straightforward ML-KEM implementation, and so stuck with Kyber for now.

There's a lot to discuss and iterate on in here, and also a lot of more straightforward TODOs (e.g. write docs) to address, but I think this gives a pretty good idea of what things might look like if this were to make its way into main.

This closes #1.

TODO:

  • Identify a credible source of test vectors
  • Codify KEM algorithm names
  • Find a solid ML-KEM implementation(?)
  • Polish documentation
  • Resolve issue where NoiseHandshakeBuilder#setComponentsFromProtocolName can't handle handshake modifiers (an existing issue!)
  • Resolve interactions between hfs and fallback modifiers
  • Align naming/terminology with FIPS 203

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.

Add support for hybrid forward secrecy (HFS) extension
1 participant