Since Go 1.24, crypto/tls offers X25519MLKEM768 by default whenever Config.CurvePreferences is left empty. Rebuilding with a current Go is usually all it takes.
Requirements
- Build with Go 1.24 or newer.
- CurvePreferences unset, or including tls.X25519MLKEM768.
Check the toolchain, or the version a binary was built with:
go version
go version ./yourbinaryTurn it on
Leave CurvePreferences nil. If you set it, include the hybrid group:
main.go
cfg := &tls.Config{
CurvePreferences: []tls.CurveID{
tls.X25519MLKEM768,
tls.X25519,
tls.CurveP256,
},
}Check that it worked
Run the checker against your hostname. It reports X25519MLKEM768 as supported once the change is live.
From a terminal, with an OpenSSL 3.5+ client. Output that names X25519MLKEM768 means it works, a handshake failure alert means it does not:
openssl s_client -connect example.com:443 -servername example.com \
-tls1_3 -groups X25519MLKEM768 </dev/null 2>&1 | grep -iE 'group|alert'Common problems
- GODEBUG=tlsmlkem=0 turns it off, and it is the default for modules whose go.mod says go 1.23 or older. Raise the go line to 1.24 or newer.
- Binaries built with Go 1.23 or older never offer it, even on a new server.