zrtp
A focused Rust implementation of the core pieces of RFC 6189 ZRTP.
Status
This crate currently provides:
- ZRTP wire/message parsing and serialization
- algorithm negotiation helpers
- CRC32C
- Confirm encryption/MAC helpers
- finite-field DH and ECDH helpers
- retained secret cache primitives
- an embeddable handshake engine
- retransmission helpers
- retained-secret ID and matching helpers
- SRTP/ZRTP key derivation surfaces
It is intended to be a reusable ZRTP-focused crate rather than a full RTP stack.
For a section-by-section view of what is implemented, partial, or intentionally out of scope, see docs/rfc6189-coverage.md.
For the verification and coverage workflow, see docs/coverage.md.
Implementation note: this repository contains the complete Codex-visible implementation of the crate; the public release artifact is restricted to the Rust crate sources, docs, examples, tests, and release metadata.
What is implemented
- Hello / Commit / DHPart1 / DHPart2 / Confirm1 / Confirm2 / Conf2ACK
- Error / ErrorACK
- GoClear / ClearACK
- SASrelay / RelayACK
- Ping / PingACK
- DH2k / DH3k / EC25 / EC38 / EC52 / Preshared / Multistream surfaces
Quick example
use *;
let hello = Hello ;
let mut engine = new;
let outbound = engine.start;
assert!;
For a more complete end-to-end example that frames messages into ZRTP packets, pumps them between two peers, verifies matching SAS output, and reaches the secure state, run:
Testing
Feature flags
crypto(default): enables hash/KDF, Confirm encryption/MAC, DH/ECDH, SAS rendering, and the handshake paths that derive SRTP/ZRTP secrets.--no-default-features: keeps the RFC 6189 wire/message types, packet framing, CRC validation, retransmission helpers, negotiation structures, and cache primitives available without pulling in crypto dependencies.
Notes
This crate is already useful as a protocol/crypto foundation, but it still needs deeper real-world interoperability validation, fuzzing, and signature-layer completeness for full production confidence.
Release
See RELEASE.md for the release checklist.