Enable post-quantum TLS (X25519MLKEM768) on Go (crypto/tls)
How to offer the hybrid post-quantum key exchange X25519MLKEM768 on Go (crypto/tls), from the vendor's documentation, checked on December 4, 2026.
Steps
- Check the requirements: Go 1.24+ (SecP256r1MLKEM768 and SecP384r1MLKEM1024 also on by default from Go 1.26).
- Apply the configuration below.
- Reload the service and check it again on checkmypqc.com.
Recommended now: post-quantum first, classical kept
// Go 1.24+: leave CurvePreferences unset; X25519MLKEM768 is on by default.
cfg := &tls.Config{
MinVersion: tls.VersionTLS12,
}
Setting CurvePreferences to a list without X25519MLKEM768, or GODEBUG=tlsmlkem=0, silently removes it. Go ignores the order of CurvePreferences.
Later: require post-quantum
cfg := &tls.Config{
MinVersion: tls.VersionTLS13,
CurvePreferences: []tls.CurveID{
tls.X25519MLKEM768,
tls.SecP256r1MLKEM768, // Go 1.26+
tls.SecP384r1MLKEM1024, // Go 1.26+
},
}
Findings
- HighNo post-quantum key exchange
CMP-TLS-KX-CLASSICAL - HighTLS 1.3 is not enabled
CMP-TLS-NO-TLS13 - HighOnly a pre-standard post-quantum group
CMP-TLS-KX-DRAFT-ONLY - HighBrowsers get classical key exchange
CMP-TLS-KX-NOT-PREFERRED - MediumCurrent browsers are refused
CMP-TLS-KX-BROWSER-REFUSED - LowA draft group is still accepted
CMP-TLS-KX-DRAFT-ENABLED - LowTLS 1.2 is still accepted
CMP-TLS-TLS12-ACCEPTED