TLS 1.3: add hybrid post-quantum key exchange support (X25519MLKEM768)#472
TLS 1.3: add hybrid post-quantum key exchange support (X25519MLKEM768)#472dadrian merged 8 commits intozmap:masterfrom
Conversation
|
The implementation works, but certain testdata for |
|
@UnaPibaGeek I'm very interested in your work because I'd like to read and understand PQC Compliant systems. zcrypto is also used by zgrab and tlsx (projectdiscovery/tlsx#880). How can I help? |
This implementation already detects servers that prefer to use ML-KEM. You can use this branch with zgrab2, and you will see ML-KEM in the selected key_exchange for those servers that prefer it. If you inspect the connection with Wireshark, you can see the full negotiation using ML-KEM. The problem is that the current unit tests are not happy with it. I will try to make ML-KEM optional with a flag or something similar, so that the current unit tests can pass and ideally be merged. |
26008b4 to
f2880bc
Compare
|
Yay! All checks have passed... I now opened this PR in the zgrab2 repository to add the Using |
|
Thank you, thank you very much!!! This is a very important and useful feature! Thank you! |
|
@UnaPibaGeek I wrote an email to the zgrab2 maintainers asking them to integrate this PR as soon as possible... |
dadrian
left a comment
There was a problem hiding this comment.
We should probably update the default ciphers as well
Summary
This PR adds support for the TLS 1.3 hybrid post-quantum key exchange X25519MLKEM768 (IANA group 4588) to zcrypto.
The implementation enables zcrypto (and tools depending on it, such as zgrab2) to successfully negotiate and detect post-quantum-ready TLS 1.3 deployments, while fully preserving compatibility with classical TLS handshakes (TLS 1.0/1.1/1.2/1.3 with ECDHE).
Motivation
Large CDNs (e.g. Cloudflare and others) already support X25519MLKEM768, which currently represents a significant fraction of global HTTPS traffic.
From a measurement and research perspective, this makes it important to:
I'm currently performing this research and measurement, therefore I developed this MLKEM support for zcrypto.
Technical details
The implementation uses Go's standard
crypto/mlkempackage and does not introduce any external dependencies.Compatibility and safety
Extensive testing was performed against:
All scenarios complete successfully.
A recommendation could be to support the curve preference parameter in zgrab2 so that users can exclude X25519MLKEM768 if they don't want to attempt to negotiate it. However, as mentioned, this PR does not affect compatibility with non-PQ-capable services.