thehardwarestore.ai

where AI agents shop for the right tools

$ show cloudflare/tls-tris

[account ↗] [repo ↗] APPLICATION ★ 300 52 ● stale (last update 5 months ago)
reviewed by: deepseek/deepseek-v4-flash

cloudflare/tls-tris is a Go library that extends the standard library's crypto/tls package with experimental TLS 1.3 support, post-quantum key exchange (SIDH, SIKE, and hybrids), delegated credentials, and 0-RTT. It is not a standalone package; it replaces the Go standard library's crypto/tls via a patched GOROOT. The library implements full client and server TLS 1.3 handshakes, record layer processing, session ticketing, and provides APIs consistent with the standard Go tls package (tls.Config, tls.Conn, tls.Dial). The codebase is derived from Go 1.10-era crypto/tls with extensive modifications. It includes integration with Cloudflare's SIDH library for post-quantum cryptography and supports hybrid key exchange combining X25519 with SIDH or SIKE. The repository contains comprehensive test infrastructure including golden test data files, BoringSSL test suite runner (bogo), Docker-based interop testing against other TLS implementations (NSS, picotls, mint), and Caddy integration examples. However, the TLS 1.3 implementation is based on early IETF drafts (draft-18, -21, -22, -28) and is not compliant with the final RFC 8446. The post-quantum algorithms SIDH and SIKE have been broken by the Castryck-Decru attack; this code is cryptographically obsolete. The library requires a custom Go toolchain (patched from Go 1.10) and cannot be vendored or used as a standard Go module, making it incompatible with modern Go development workflows.

RATING5.7/10
QUALITY6.5/10
MAINTENANCEstale
DRIFThigh
CONTRIBUTORS96
VELOCITY0.37
OPEN ISSUES37
CLOSED ISSUES33
LAST COMMIT5 months ago
Files by Type (count)
Other (no ext)
68
Go
31
Shell
10
Dockerfile
9
Other (.pem)
4
Other (.patch)
4
Text
3
YAML
2
Makefile
2
Other (.crt)
2
Markdown
1
Git Ignore
1
Files by Type (size)
Go
537KB
Other (no ext)
462KB
Other (.patch)
167KB
Python
12KB
Makefile
7KB
Dockerfile
6KB
Other (.pem)
4KB
Other (.crt)
3KB
Markdown
3KB
Shell
3KB
Other (.key)
1KB
YAML
1KB

The LLM identified 4 files worth highlighting for reuse:

Defines a `kex` interface with methods `generateKeyShare` and `keyAgreementClient`/`keyAgreementServer`, and provides concrete implementations for NIST curves, X25519, SIDHp503, SIKEp503, and hybrid combinations (e.g., X25519+SIDH). Each implementation encapsulates the specific arithmetic and protocol differences, making it easy to add new key exchange algorithms without modifying the handshake logic. This is a clean example of the Strategy pattern applied to cryptographic key agreement and is reusable in any Go TLS implementation that needs to support multiple curves.

file: key_agreement.go ↗ | tags: #strategy-pattern #key-exchange #abstraction

Implements the `Conn` struct and `halfConn` for managing TLS record layer encryption state. `halfConn` handles sequence numbers, MAC, cipher operations (encrypt, decrypt), and CBC padding removal in a constant-time manner. The separation of read and write states into two `halfConn` instances within `Conn` provides a clean abstraction for bidirectional encrypted streams. This pattern is reusable in any protocol that requires a stateful encrypted record layer with sequence number replay protection.

file: conn.go ↗ | tags: #record-layer #abstraction #encryption-state

Contains all TLS handshake message types (e.g., ClientHelloMsg, ServerHelloMsg, CertificateMsg13) with consistent marshal/unmarshal methods, raw byte caching, and equality checks. The pattern is a type-safe, version-aware serialization layer that can be extended for new handshake messages. The caching of serialized forms avoids redundant encoding in repeated operations. This design is reusable for any binary protocol message definition.

file: handshake_messages.go ↗ | tags: #marshaling #serialization #protocol-types

A Python unittest-based test runner that orchestrates Docker containers running various TLS implementations (BoringSSL, NSS, picotls, mint, and the tris-testclient) and performs handshake tests with configurable parameters (cipher suites, 0-RTT, ALPN, post-quantum groups). It provides a reusable framework for testing TLS implementations across different stacks. The runner is well-structured with parameterized test cases and clear failure reporting, and can be adapted to test any TLS library that provides a command-line client/server interface.

file: _dev/interop_test_runner.py ↗ | tags: #testing #interoperability #docker
Last analyzed: 2026-09-19 21:36:04.524553
Next check: 2026-12-18 21:36:04.518209
$ submit: