{"record":{"id":"8f1ad4ad23d575a5","repo":"golang/go","slug":"connection-doesn-t-support-ed25519","errorCode":null,"errorMessage":"connection doesn't support Ed25519","messagePattern":"connection doesn't support Ed25519","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/crypto/tls/common.go","lineNumber":1504,"sourceCode":"\t\t\tcase elliptic.P521():\n\t\t\t\tcurve = CurveP521\n\t\t\tdefault:\n\t\t\t\treturn supportsRSAFallback(unsupportedCertificateError(c))\n\t\t\t}\n\t\t\tvar curveOk bool\n\t\t\tfor _, c := range chi.SupportedCurves {\n\t\t\t\tif c == curve && config.supportsCurve(vers, c) {\n\t\t\t\t\tcurveOk = true\n\t\t\t\t\tbreak\n\t\t\t\t}\n\t\t\t}\n\t\t\tif !curveOk {\n\t\t\t\treturn errors.New(\"client doesn't support certificate curve\")\n\t\t\t}\n\t\t\tecdsaCipherSuite = true\n\t\tcase ed25519.PublicKey:\n\t\t\tif vers < VersionTLS12 || len(chi.SignatureSchemes) == 0 {\n\t\t\t\treturn errors.New(\"connection doesn't support Ed25519\")\n\t\t\t}\n\t\t\tecdsaCipherSuite = true\n\t\tcase *mldsa.PublicKey:\n\t\t\t// ML-DSA requires TLS 1.3, which we already excluded above.\n\t\t\treturn errors.New(\"connection doesn't support ML-DSA\")\n\t\tcase *rsa.PublicKey:\n\t\tdefault:\n\t\t\treturn supportsRSAFallback(unsupportedCertificateError(c))\n\t\t}\n\t} else {\n\t\treturn supportsRSAFallback(unsupportedCertificateError(c))\n\t}\n\n\t// Make sure that there is a mutually supported cipher suite that works with\n\t// this certificate. Cipher suite selection will then apply the logic in\n\t// reverse to pick it. See also serverHandshakeState.cipherSuiteOk.\n\tcipherSuite := selectCipherSuite(chi.CipherSuites, config.supportedCipherSuites(), func(c *cipherSuite) bool {\n\t\tif c.flags&suiteECDHE == 0 {","sourceCodeStart":1486,"sourceCodeEnd":1522,"githubUrl":"https://github.com/golang/go/blob/b6b368adc57c96c3151d224d172029f233ead2c3/src/crypto/tls/common.go#L1486-L1522","documentation":"A server certificate uses an Ed25519 public key, but the client connection cannot use Ed25519 for signing. TLS permits Ed25519 only from TLS 1.2 onward and requires the client to advertise at least one signature scheme in its ClientHello (signature_algorithms extension). If either precondition fails, the certificate is rejected as incompatible with the connection.","triggerScenarios":"serverCapabilitiesOfCertificate / supportsCertificate evaluates a *Certificate whose leaf public key is ed25519.PublicKey, while vers < VersionTLS12 OR len(chi.SignatureSchemes) == 0.","commonSituations":"Configuring a TLS 1.0/1.1-only client against an Ed25519 certificate; a legacy/bespoke client that omits the signature_algorithms extension; a server with an Ed25519 leaf cert being matched to a very old or minimal ClientHello.","solutions":["Upgrade the negotiated TLS version to at least 1.2 (set MinVersion to tls.VersionTLS12 on the client config)","Ensure the client advertises signature schemes — use a standard tls.Config rather than a hand-built ClientHello; if customizing, populate SignatureSchemes with ed25519 values","Replace the server certificate's Ed25519 key with an ECDSA/RSA key compatible with the client's capabilities"],"exampleFix":"// before: client MinVersion left at default TLS 1.0\ncfg := &tls.Config{ /* MinVersion unset */ }\n// after\ncfg := &tls.Config{MinVersion: tls.VersionTLS12}","handlingStrategy":"validation","validationCode":"// Before offering the cert, check compatibility\nfunc ed25519Compatible(vers uint16, sigSchemes []tls.SignatureScheme) bool {\n    if vers < tls.VersionTLS12 || len(sigSchemes) == 0 {\n        return false\n    }\n    for _, s := range sigSchemes {\n        if s == tls.PSSWithSHA256 /* etc */ || s == 0x0807 /* ed25519 */ {\n            return true\n        }\n    }\n    return false\n}","typeGuard":"func isEd25519Cert(c *tls.Certificate) bool {\n    pub, ok := c.PrivateKey.(crypto.Signer)\n    return ok && reflect.TypeOf(pub.Public()) == reflect.TypeOf(ed25519.PublicKey{})\n}","tryCatchPattern":"if _, err := cfg.BuildTLSConfig(); err != nil {\n    var unsupported interface{ Unwrap() error }\n    _ = unsupported\n}","preventionTips":["Set MinVersion = tls.VersionTLS12 globally on client configs","Prefer ECDSA/RSA certs for broad client compatibility; reserve Ed25519 for known-modern peers","Validate cert key type against negotiated protocol version in test fixtures"],"tags":["tls","certificate","ed25519","handshake"],"backgroundTag":null,"analyzedSha":"b6b368adc57c96c3151d224d172029f233ead2c3","analyzedAt":"2026-08-12T00:22:02.250Z","schemaVersion":2},"datasetVersion":"2026-08-12T13:17:24.610Z"}