TLS 1.3 in Zig: a sans-I/O engine over caller-owned buffers, with blocking, nonblocking, and kTLS integrations.
https://baskingspot.dev/tls/ β// momentum
// why it's here
- Active: last commit today
- Built almost entirely by one person
- Health 100/100 with only 8 stars
- 10 releases in the last 90 days
// how to help
// readme
TLS 1.3 in Zig: a sans-I/O engine over caller-owned buffers, with blocking, nonblocking, and kTLS integrations.
Warning: the default native backend is for development and iteration, not
production. No independent security review exists for native, and its record
AEAD is about 5x slower than libcrypto at 4 KiB. Production builds must select
-Dcrypto=openssl or -Dcrypto=aws-lc.
Native does not support RSA signing, encrypted PEM, or ML-KEM-1024. A native server needs an ECDSA P-256/P-384 or Ed25519 credential. Native loads Ed25519 keys, verifies Ed25519 chain signatures, and signs and verifies Ed25519 CertificateVerify.
The engine is a TLS 1.3 state machine. You feed it the bytes you read off the
wire and it hands back the bytes to write. The socket, the event loop, and the
buffers stay yours. The tls_std, tls_nonblocking, and tls_ktls modules
drive that engine over a transport; the core never opens one.
The libcrypto builds are faster than OpenSSLβs libssl on every comparable application-data row measured, on x86_64, aarch64, and macOS Apple Silicon. Against rustls they win on AES-GCM on all three, and lose on small ChaCha20 records.