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 hybrid KEMTLS #68

Open
2 tasks
claucece opened this issue Mar 15, 2021 · 7 comments
Open
2 tasks

Add hybrid KEMTLS #68

claucece opened this issue Mar 15, 2021 · 7 comments
Assignees
Labels
pqxp PostQuantum Experimentation

Comments

@claucece
Copy link
Contributor

We need to add a version of a hybrid KEMTLS. This needs to:

  • Define an specification for how Hybrid KEMTLS works
  • Add the appropriate changes to the KEMTLS code.

Depends on #66

@claucece
Copy link
Contributor Author

claucece commented Mar 15, 2021

cc./ @armfazh @bwesterb @thomwiggers

@claucece claucece added the pqxp PostQuantum Experimentation label Mar 15, 2021
@claucece claucece self-assigned this Mar 15, 2021
@thomwiggers
Copy link
Contributor

"hybrid KEMTLS" is just KEMTLS with hybrid KEMs for the ephemeral and static (leaf cert) KEM, and and hybrid signature schemes in the signature chain.

The security proof does not rely on fancy properties of the KEMs or signature schemes, so we don't need to make any protocol changes in that sense. We might need to pick some identifiers but that's not any different from what needs to be done for PQ-only KEMs.

This is probably most easily implemented by treating the hybrid KEM as a completely independent algorithm from its constituent components. Treat "KyberX25519" is a "proper" algorithm and do not give it any special treatment on the wire compared to "X25519" or "Kyber". If that means duplicate X25519 public keys: so be it.

So that means following the same strategy as is proposed for draft-ietf-tls-hybrid-design. This draft only covers the (ephemeral) key exchange, of course, so we need to adjust also for the static KEM key exchange: just slap two keys together in the certificate as well and do the same for the ciphertext sent back to the server/client.

For certificates we can probably also do something similar: just slap two signatures together and verify both.

@thomwiggers
Copy link
Contributor

thomwiggers commented Mar 16, 2021

So my previous post covers the specification more-or-less 😉

With regards to implementation changes that'd then be:

  • Add hybrid algorithms
  • Add algorithms to negotiation (i.e. supported algorithm lists)

@bwesterb
Copy link
Member

bwesterb commented Mar 16, 2021

I agree with Thom. Circl already supports some hybrid KEMs (eg. Kyber512-X25519) and Signatures (eg. Ed25519-Dilithium3.). For the latter we have also have OIDs (see Old() in Circl.) For the former not yet — Cloudflare can just register them though — it's on the internal wiki how to.

We also need internal TLS identifiers, but we can just pick some in the reserved space. See TLSIdentifier in Circl.

@claucece
Copy link
Contributor Author

yes! thanks you @thomwiggers @bwesterb

For the former not yet — Cloudflare can just register them though — it's on the internal wiki how to.

I'll check about this.

We also need internal TLS identifiers, but we can just pick some in the reserved space. See TLSIdentifier in Circl.

Perfect!

I'll add this to our KEMTLS draft ;)

@claucece
Copy link
Contributor Author

On our next meeting, I'll like to talk about this questions, as taken from https://datatracker.ietf.org/doc/html/draft-ietf-tls-hybrid-design#section-4:

  • Duplication of key shares: Concatenation of public keys in the "HybridKeyExchange" struct can result in sending duplicate key shares. For example, if a client wanted to offer support for two combinations, say "secp256r1+sikep503" and "x25519+sikep503", it would end up sending two sikep503 public keys, since the "KeyShareEntry" for each combination contains its own copy of a sikep503 key. This duplication may be more problematic for post-quantum algorithms which have larger public keys.

  • Resumption: TLS 1.3 allows for session resumption via a PSK. When a PSK is used during session establishment, an ephemeral key exchange can also be used to enhance forward secrecy. If the original key exchange was hybrid, should an ephemeral key exchange in a resumption of that original key exchange be required to use the same hybrid algorithms?

  • Failures: Some post-quantum key exchange algorithms have non- trivial failure rates: two honest parties may fail to agree on the same shared secret with non-negligible probability. Does a non-negligible failure rate affect the security of TLS? How should such a failure be treated operationally? What is an acceptable failure rate?

Putting it here for people to think about it prior to our meeting.

Also, cc./ @chris-wood

@thomwiggers
Copy link
Contributor

Failures

Failures aiui only occur in IND-CPA secure KEMs, but you need an IND-CCA secure KEM (src: KEMTLS paper). This means failures would be cryptographically negligible

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pqxp PostQuantum Experimentation
Projects
None yet
Development

No branches or pull requests

3 participants