ratchet: Double Ratchet state machine for chat frames
New wire-independent `src/ratchet.rs` + `tests/ratchet.rs`: KDF_RK/KDF_CK as in the Signal spec, symmetric ratchet, DH ratchet, skipped-key store with the MAX_SKIP / MAX_SKIPPED_KEYS bounds, versioned state serialization and zeroize of every superseded secret. Initiation gate: per-direction chains seeded by ratchet-key ordering (option (a)), so both peers can build a sending chain before either has received, and a single deterministic tie-break (lower ratchet key rotates first) keeps exactly one rotation in flight. Documented under "Initiation and convergence" and covered by both_peers_send_first_converges, which fails on a crossing rotation. Adds hkdf 0.12 + hmac 0.12 (0.13 pulls digest 0.11 and will not build against sha2 0.10) and regenerates crates/onionwire-sdk/Cargo.lock.
This commit is contained in:
parent
3eee27fd09
commit
8b2e834616
6 changed files with 1204 additions and 0 deletions
2
crates/onionwire-sdk/Cargo.lock
generated
2
crates/onionwire-sdk/Cargo.lock
generated
|
|
@ -2768,6 +2768,8 @@ dependencies = [
|
|||
"chacha20poly1305",
|
||||
"ed25519-dalek",
|
||||
"futures",
|
||||
"hkdf",
|
||||
"hmac",
|
||||
"md-5",
|
||||
"qrcode",
|
||||
"rand 0.8.8",
|
||||
|
|
|
|||
Loading…
Reference in a new issue