1 // Copyright 2010 The Go Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style
3 // license that can be found in the LICENSE file.
7 import "crypto/internal/boring"
22 "golang.org/x/crypto/chacha20poly1305"
25 // CipherSuite is a TLS cipher suite. Note that most functions in this package
26 // accept and expose cipher suite IDs instead of this type.
27 type CipherSuite struct {
31 // Supported versions is the list of TLS protocol versions that can
32 // negotiate this cipher suite.
33 SupportedVersions []uint16
35 // Insecure is true if the cipher suite has known security issues
36 // due to its primitives, design, or implementation.
41 supportedUpToTLS12 = []uint16{VersionTLS10, VersionTLS11, VersionTLS12}
42 supportedOnlyTLS12 = []uint16{VersionTLS12}
43 supportedOnlyTLS13 = []uint16{VersionTLS13}
46 // CipherSuites returns a list of cipher suites currently implemented by this
47 // package, excluding those with security issues, which are returned by
48 // InsecureCipherSuites.
50 // The list is sorted by ID. Note that the default cipher suites selected by
51 // this package might depend on logic that can't be captured by a static list.
52 func CipherSuites() []*CipherSuite {
53 return []*CipherSuite{
54 {TLS_RSA_WITH_3DES_EDE_CBC_SHA, "TLS_RSA_WITH_3DES_EDE_CBC_SHA", supportedUpToTLS12, false},
55 {TLS_RSA_WITH_AES_128_CBC_SHA, "TLS_RSA_WITH_AES_128_CBC_SHA", supportedUpToTLS12, false},
56 {TLS_RSA_WITH_AES_256_CBC_SHA, "TLS_RSA_WITH_AES_256_CBC_SHA", supportedUpToTLS12, false},
57 {TLS_RSA_WITH_AES_128_GCM_SHA256, "TLS_RSA_WITH_AES_128_GCM_SHA256", supportedOnlyTLS12, false},
58 {TLS_RSA_WITH_AES_256_GCM_SHA384, "TLS_RSA_WITH_AES_256_GCM_SHA384", supportedOnlyTLS12, false},
60 {TLS_AES_128_GCM_SHA256, "TLS_AES_128_GCM_SHA256", supportedOnlyTLS13, false},
61 {TLS_AES_256_GCM_SHA384, "TLS_AES_256_GCM_SHA384", supportedOnlyTLS13, false},
62 {TLS_CHACHA20_POLY1305_SHA256, "TLS_CHACHA20_POLY1305_SHA256", supportedOnlyTLS13, false},
64 {TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA, "TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA", supportedUpToTLS12, false},
65 {TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA, "TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA", supportedUpToTLS12, false},
66 {TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA, "TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA", supportedUpToTLS12, false},
67 {TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA, "TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA", supportedUpToTLS12, false},
68 {TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA, "TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA", supportedUpToTLS12, false},
69 {TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256, "TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256", supportedOnlyTLS12, false},
70 {TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384, "TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384", supportedOnlyTLS12, false},
71 {TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256, "TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256", supportedOnlyTLS12, false},
72 {TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384, "TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384", supportedOnlyTLS12, false},
73 {TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256, "TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256", supportedOnlyTLS12, false},
74 {TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256, "TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256", supportedOnlyTLS12, false},
78 // InsecureCipherSuites returns a list of cipher suites currently implemented by
79 // this package and which have security issues.
81 // Most applications should not use the cipher suites in this list, and should
82 // only use those returned by CipherSuites.
83 func InsecureCipherSuites() []*CipherSuite {
84 // RC4 suites are broken because RC4 is.
85 // CBC-SHA256 suites have no Lucky13 countermeasures.
86 return []*CipherSuite{
87 {TLS_RSA_WITH_RC4_128_SHA, "TLS_RSA_WITH_RC4_128_SHA", supportedUpToTLS12, true},
88 {TLS_RSA_WITH_AES_128_CBC_SHA256, "TLS_RSA_WITH_AES_128_CBC_SHA256", supportedOnlyTLS12, true},
89 {TLS_ECDHE_ECDSA_WITH_RC4_128_SHA, "TLS_ECDHE_ECDSA_WITH_RC4_128_SHA", supportedUpToTLS12, true},
90 {TLS_ECDHE_RSA_WITH_RC4_128_SHA, "TLS_ECDHE_RSA_WITH_RC4_128_SHA", supportedUpToTLS12, true},
91 {TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256, "TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256", supportedOnlyTLS12, true},
92 {TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256, "TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256", supportedOnlyTLS12, true},
96 // CipherSuiteName returns the standard name for the passed cipher suite ID
97 // (e.g. "TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256"), or a fallback representation
98 // of the ID value if the cipher suite is not implemented by this package.
99 func CipherSuiteName(id uint16) string {
100 for _, c := range CipherSuites() {
105 for _, c := range InsecureCipherSuites() {
110 return fmt.Sprintf("0x%04X", id)
113 // a keyAgreement implements the client and server side of a TLS key agreement
114 // protocol by generating and processing key exchange messages.
115 type keyAgreement interface {
116 // On the server side, the first two methods are called in order.
118 // In the case that the key agreement protocol doesn't use a
119 // ServerKeyExchange message, generateServerKeyExchange can return nil,
121 generateServerKeyExchange(*Config, *Certificate, *clientHelloMsg, *serverHelloMsg) (*serverKeyExchangeMsg, error)
122 processClientKeyExchange(*Config, *Certificate, *clientKeyExchangeMsg, uint16) ([]byte, error)
124 // On the client side, the next two methods are called in order.
126 // This method may not be called if the server doesn't send a
127 // ServerKeyExchange message.
128 processServerKeyExchange(*Config, *clientHelloMsg, *serverHelloMsg, *x509.Certificate, *serverKeyExchangeMsg) error
129 generateClientKeyExchange(*Config, *clientHelloMsg, *x509.Certificate) ([]byte, *clientKeyExchangeMsg, error)
133 // suiteECDHE indicates that the cipher suite involves elliptic curve
134 // Diffie-Hellman. This means that it should only be selected when the
135 // client indicates that it supports ECC with a curve and point format
136 // that we're happy with.
137 suiteECDHE = 1 << iota
138 // suiteECSign indicates that the cipher suite involves an ECDSA or
139 // EdDSA signature and therefore may only be selected when the server's
140 // certificate is ECDSA or EdDSA. If this is not set then the cipher suite
143 // suiteTLS12 indicates that the cipher suite should only be advertised
144 // and accepted when using TLS 1.2.
146 // suiteSHA384 indicates that the cipher suite uses SHA384 as the
149 // suiteDefaultOff indicates that this cipher suite is not included by
154 // A cipherSuite is a specific combination of key agreement, cipher and MAC function.
155 type cipherSuite struct {
157 // the lengths, in bytes, of the key material needed for each component.
161 ka func(version uint16) keyAgreement
162 // flags is a bitmask of the suite* values, above.
164 cipher func(key, iv []byte, isRead bool) interface{}
165 mac func(key []byte) hash.Hash
166 aead func(key, fixedNonce []byte) aead
169 var cipherSuites = []*cipherSuite{
170 // Ciphersuite order is chosen so that ECDHE comes before plain RSA and
171 // AEADs are the top preference.
172 {TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305, 32, 0, 12, ecdheRSAKA, suiteECDHE | suiteTLS12, nil, nil, aeadChaCha20Poly1305},
173 {TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305, 32, 0, 12, ecdheECDSAKA, suiteECDHE | suiteECSign | suiteTLS12, nil, nil, aeadChaCha20Poly1305},
174 {TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256, 16, 0, 4, ecdheRSAKA, suiteECDHE | suiteTLS12, nil, nil, aeadAESGCM},
175 {TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256, 16, 0, 4, ecdheECDSAKA, suiteECDHE | suiteECSign | suiteTLS12, nil, nil, aeadAESGCM},
176 {TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384, 32, 0, 4, ecdheRSAKA, suiteECDHE | suiteTLS12 | suiteSHA384, nil, nil, aeadAESGCM},
177 {TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384, 32, 0, 4, ecdheECDSAKA, suiteECDHE | suiteECSign | suiteTLS12 | suiteSHA384, nil, nil, aeadAESGCM},
178 {TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256, 16, 32, 16, ecdheRSAKA, suiteECDHE | suiteTLS12 | suiteDefaultOff, cipherAES, macSHA256, nil},
179 {TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA, 16, 20, 16, ecdheRSAKA, suiteECDHE, cipherAES, macSHA1, nil},
180 {TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256, 16, 32, 16, ecdheECDSAKA, suiteECDHE | suiteECSign | suiteTLS12 | suiteDefaultOff, cipherAES, macSHA256, nil},
181 {TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA, 16, 20, 16, ecdheECDSAKA, suiteECDHE | suiteECSign, cipherAES, macSHA1, nil},
182 {TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA, 32, 20, 16, ecdheRSAKA, suiteECDHE, cipherAES, macSHA1, nil},
183 {TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA, 32, 20, 16, ecdheECDSAKA, suiteECDHE | suiteECSign, cipherAES, macSHA1, nil},
184 {TLS_RSA_WITH_AES_128_GCM_SHA256, 16, 0, 4, rsaKA, suiteTLS12, nil, nil, aeadAESGCM},
185 {TLS_RSA_WITH_AES_256_GCM_SHA384, 32, 0, 4, rsaKA, suiteTLS12 | suiteSHA384, nil, nil, aeadAESGCM},
186 {TLS_RSA_WITH_AES_128_CBC_SHA256, 16, 32, 16, rsaKA, suiteTLS12 | suiteDefaultOff, cipherAES, macSHA256, nil},
187 {TLS_RSA_WITH_AES_128_CBC_SHA, 16, 20, 16, rsaKA, 0, cipherAES, macSHA1, nil},
188 {TLS_RSA_WITH_AES_256_CBC_SHA, 32, 20, 16, rsaKA, 0, cipherAES, macSHA1, nil},
189 {TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA, 24, 20, 8, ecdheRSAKA, suiteECDHE, cipher3DES, macSHA1, nil},
190 {TLS_RSA_WITH_3DES_EDE_CBC_SHA, 24, 20, 8, rsaKA, 0, cipher3DES, macSHA1, nil},
192 // RC4-based cipher suites are disabled by default.
193 {TLS_RSA_WITH_RC4_128_SHA, 16, 20, 0, rsaKA, suiteDefaultOff, cipherRC4, macSHA1, nil},
194 {TLS_ECDHE_RSA_WITH_RC4_128_SHA, 16, 20, 0, ecdheRSAKA, suiteECDHE | suiteDefaultOff, cipherRC4, macSHA1, nil},
195 {TLS_ECDHE_ECDSA_WITH_RC4_128_SHA, 16, 20, 0, ecdheECDSAKA, suiteECDHE | suiteECSign | suiteDefaultOff, cipherRC4, macSHA1, nil},
198 // selectCipherSuite returns the first cipher suite from ids which is also in
199 // supportedIDs and passes the ok filter.
200 func selectCipherSuite(ids, supportedIDs []uint16, ok func(*cipherSuite) bool) *cipherSuite {
201 for _, id := range ids {
202 candidate := cipherSuiteByID(id)
203 if candidate == nil || !ok(candidate) {
207 for _, suppID := range supportedIDs {
216 // A cipherSuiteTLS13 defines only the pair of the AEAD algorithm and hash
217 // algorithm to be used with HKDF. See RFC 8446, Appendix B.4.
218 type cipherSuiteTLS13 struct {
221 aead func(key, fixedNonce []byte) aead
225 var cipherSuitesTLS13 = []*cipherSuiteTLS13{
226 {TLS_AES_128_GCM_SHA256, 16, aeadAESGCMTLS13, crypto.SHA256},
227 {TLS_CHACHA20_POLY1305_SHA256, 32, aeadChaCha20Poly1305, crypto.SHA256},
228 {TLS_AES_256_GCM_SHA384, 32, aeadAESGCMTLS13, crypto.SHA384},
231 func cipherRC4(key, iv []byte, isRead bool) interface{} {
232 cipher, _ := rc4.NewCipher(key)
236 func cipher3DES(key, iv []byte, isRead bool) interface{} {
237 block, _ := des.NewTripleDESCipher(key)
239 return cipher.NewCBCDecrypter(block, iv)
241 return cipher.NewCBCEncrypter(block, iv)
244 func cipherAES(key, iv []byte, isRead bool) interface{} {
245 block, _ := aes.NewCipher(key)
247 return cipher.NewCBCDecrypter(block, iv)
249 return cipher.NewCBCEncrypter(block, iv)
252 // macSHA1 returns a SHA-1 based constant time MAC.
253 func macSHA1(key []byte) hash.Hash {
255 // The BoringCrypto SHA1 does not have a constant-time
256 // checksum function, so don't try to use it.
258 h = newConstantTimeHash(h)
260 return hmac.New(h, key)
263 // macSHA256 returns a SHA-256 based MAC. This is only supported in TLS 1.2 and
264 // is currently only used in disabled-by-default cipher suites.
265 func macSHA256(key []byte) hash.Hash {
266 return hmac.New(sha256.New, key)
269 type aead interface {
272 // explicitNonceLen returns the number of bytes of explicit nonce
273 // included in each record. This is eight for older AEADs and
274 // zero for modern ones.
275 explicitNonceLen() int
280 noncePrefixLength = 4
283 // prefixNonceAEAD wraps an AEAD and prefixes a fixed portion of the nonce to
285 type prefixNonceAEAD struct {
286 // nonce contains the fixed part of the nonce in the first four bytes.
287 nonce [aeadNonceLength]byte
291 func (f *prefixNonceAEAD) NonceSize() int { return aeadNonceLength - noncePrefixLength }
292 func (f *prefixNonceAEAD) Overhead() int { return f.aead.Overhead() }
293 func (f *prefixNonceAEAD) explicitNonceLen() int { return f.NonceSize() }
295 func (f *prefixNonceAEAD) Seal(out, nonce, plaintext, additionalData []byte) []byte {
296 copy(f.nonce[4:], nonce)
297 return f.aead.Seal(out, f.nonce[:], plaintext, additionalData)
300 func (f *prefixNonceAEAD) Open(out, nonce, ciphertext, additionalData []byte) ([]byte, error) {
301 copy(f.nonce[4:], nonce)
302 return f.aead.Open(out, f.nonce[:], ciphertext, additionalData)
305 // xoredNonceAEAD wraps an AEAD by XORing in a fixed pattern to the nonce
307 type xorNonceAEAD struct {
308 nonceMask [aeadNonceLength]byte
312 func (f *xorNonceAEAD) NonceSize() int { return 8 } // 64-bit sequence number
313 func (f *xorNonceAEAD) Overhead() int { return f.aead.Overhead() }
314 func (f *xorNonceAEAD) explicitNonceLen() int { return 0 }
316 func (f *xorNonceAEAD) Seal(out, nonce, plaintext, additionalData []byte) []byte {
317 for i, b := range nonce {
318 f.nonceMask[4+i] ^= b
320 result := f.aead.Seal(out, f.nonceMask[:], plaintext, additionalData)
321 for i, b := range nonce {
322 f.nonceMask[4+i] ^= b
328 func (f *xorNonceAEAD) Open(out, nonce, ciphertext, additionalData []byte) ([]byte, error) {
329 for i, b := range nonce {
330 f.nonceMask[4+i] ^= b
332 result, err := f.aead.Open(out, f.nonceMask[:], ciphertext, additionalData)
333 for i, b := range nonce {
334 f.nonceMask[4+i] ^= b
340 type gcmtls interface {
341 NewGCMTLS() (cipher.AEAD, error)
344 func aeadAESGCM(key, noncePrefix []byte) aead {
345 if len(noncePrefix) != noncePrefixLength {
346 panic("tls: internal error: wrong nonce length")
348 aes, err := aes.NewCipher(key)
353 if aesTLS, ok := aes.(gcmtls); ok {
354 aead, err = aesTLS.NewGCMTLS()
357 aead, err = cipher.NewGCM(aes)
363 ret := &prefixNonceAEAD{aead: aead}
364 copy(ret.nonce[:], noncePrefix)
368 func aeadAESGCMTLS13(key, nonceMask []byte) aead {
369 if len(nonceMask) != aeadNonceLength {
370 panic("tls: internal error: wrong nonce length")
372 aes, err := aes.NewCipher(key)
376 aead, err := cipher.NewGCM(aes)
381 ret := &xorNonceAEAD{aead: aead}
382 copy(ret.nonceMask[:], nonceMask)
386 func aeadChaCha20Poly1305(key, nonceMask []byte) aead {
387 if len(nonceMask) != aeadNonceLength {
388 panic("tls: internal error: wrong nonce length")
390 aead, err := chacha20poly1305.New(key)
395 ret := &xorNonceAEAD{aead: aead}
396 copy(ret.nonceMask[:], nonceMask)
400 type constantTimeHash interface {
402 ConstantTimeSum(b []byte) []byte
405 // cthWrapper wraps any hash.Hash that implements ConstantTimeSum, and replaces
406 // with that all calls to Sum. It's used to obtain a ConstantTimeSum-based HMAC.
407 type cthWrapper struct {
411 func (c *cthWrapper) Size() int { return c.h.Size() }
412 func (c *cthWrapper) BlockSize() int { return c.h.BlockSize() }
413 func (c *cthWrapper) Reset() { c.h.Reset() }
414 func (c *cthWrapper) Write(p []byte) (int, error) { return c.h.Write(p) }
415 func (c *cthWrapper) Sum(b []byte) []byte { return c.h.ConstantTimeSum(b) }
417 func newConstantTimeHash(h func() hash.Hash) func() hash.Hash {
419 return func() hash.Hash {
420 return &cthWrapper{h().(constantTimeHash)}
424 // tls10MAC implements the TLS 1.0 MAC function. RFC 2246, Section 6.2.3.
425 func tls10MAC(h hash.Hash, out, seq, header, data, extra []byte) []byte {
437 func rsaKA(version uint16) keyAgreement {
438 return rsaKeyAgreement{}
441 func ecdheECDSAKA(version uint16) keyAgreement {
442 return &ecdheKeyAgreement{
448 func ecdheRSAKA(version uint16) keyAgreement {
449 return &ecdheKeyAgreement{
455 // mutualCipherSuite returns a cipherSuite given a list of supported
456 // ciphersuites and the id requested by the peer.
457 func mutualCipherSuite(have []uint16, want uint16) *cipherSuite {
458 for _, id := range have {
460 return cipherSuiteByID(id)
466 func cipherSuiteByID(id uint16) *cipherSuite {
467 for _, cipherSuite := range cipherSuites {
468 if cipherSuite.id == id {
475 func mutualCipherSuiteTLS13(have []uint16, want uint16) *cipherSuiteTLS13 {
476 for _, id := range have {
478 return cipherSuiteTLS13ByID(id)
484 func cipherSuiteTLS13ByID(id uint16) *cipherSuiteTLS13 {
485 for _, cipherSuite := range cipherSuitesTLS13 {
486 if cipherSuite.id == id {
493 // A list of cipher suite IDs that are, or have been, implemented by this
496 // See https://www.iana.org/assignments/tls-parameters/tls-parameters.xml
498 // TLS 1.0 - 1.2 cipher suites.
499 TLS_RSA_WITH_RC4_128_SHA uint16 = 0x0005
500 TLS_RSA_WITH_3DES_EDE_CBC_SHA uint16 = 0x000a
501 TLS_RSA_WITH_AES_128_CBC_SHA uint16 = 0x002f
502 TLS_RSA_WITH_AES_256_CBC_SHA uint16 = 0x0035
503 TLS_RSA_WITH_AES_128_CBC_SHA256 uint16 = 0x003c
504 TLS_RSA_WITH_AES_128_GCM_SHA256 uint16 = 0x009c
505 TLS_RSA_WITH_AES_256_GCM_SHA384 uint16 = 0x009d
506 TLS_ECDHE_ECDSA_WITH_RC4_128_SHA uint16 = 0xc007
507 TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA uint16 = 0xc009
508 TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA uint16 = 0xc00a
509 TLS_ECDHE_RSA_WITH_RC4_128_SHA uint16 = 0xc011
510 TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA uint16 = 0xc012
511 TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA uint16 = 0xc013
512 TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA uint16 = 0xc014
513 TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256 uint16 = 0xc023
514 TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256 uint16 = 0xc027
515 TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 uint16 = 0xc02f
516 TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256 uint16 = 0xc02b
517 TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 uint16 = 0xc030
518 TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384 uint16 = 0xc02c
519 TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256 uint16 = 0xcca8
520 TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256 uint16 = 0xcca9
522 // TLS 1.3 cipher suites.
523 TLS_AES_128_GCM_SHA256 uint16 = 0x1301
524 TLS_AES_256_GCM_SHA384 uint16 = 0x1302
525 TLS_CHACHA20_POLY1305_SHA256 uint16 = 0x1303
527 // TLS_FALLBACK_SCSV isn't a standard cipher suite but an indicator
528 // that the client is doing version fallback. See RFC 7507.
529 TLS_FALLBACK_SCSV uint16 = 0x5600
531 // Legacy names for the corresponding cipher suites with the correct _SHA256
532 // suffix, retained for backward compatibility.
533 TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305 = TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256
534 TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305 = TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256