Add Phase Security v0 design docs and protocol v2 draft. - #10
Open
YanChao1999 wants to merge 1 commit into
Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds Phase Security v0 design documentation and a draft “protocol v2” spec describing optional pairing/control and SRTP-encrypted media, plus updates existing docs to reference the new material.
Changes:
- Add draft v2 protocol spec covering discovery TXT extensions, QUIC control messages, pairing, and SRTP key derivation.
- Add Phase Security design/implementation tracker (threat model, rollout plan, crate mapping).
- Update README and spec index/docs to link to the new security docs and v2 draft.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
| README.md | Links to the new v2 draft spec and Phase Security tracker; updates roadmap to include Phase Security v0. |
| docs/spec/std/zerocast-protocol-v2.md | New draft protocol v2 security extensions spec (pairing/control/SRTP). |
| docs/spec/std/zerocast-protocol-v1.md | Adds pointer to the planned v2 security extensions and Phase Security tracker. |
| docs/spec/README.md | Adds the v2 draft spec and Phase Security tracker to the normative docs list. |
| docs/PHASE-SECURITY.md | New Phase Security design doc/tracker for OOB pairing, QUIC control, and SRTP. |
Comment on lines
+95
to
+101
| ### 5.3 Session resume (trusted sender) | ||
|
|
||
| If sender’s `device_id` is in receiver trust store: | ||
|
|
||
| 1. `SessionStart` includes sender `device_id` and Ed25519 signature over `(session_nonce || receiver_device_id)`. | ||
| 2. Receiver verifies signature against stored pubkey; skips PIN. | ||
| 3. Both derive fresh SRTP keys from `pairing_secret` or a stored long-term secret plus `session_nonce` (implementation detail; MUST provide forward secrecy per session via random `session_nonce`). |
Comment on lines
+81
to
+83
| | `SessionStart` | S → R | Request media session; includes negotiated profile hints | | ||
| | `SessionAccept` | R → S | Session id, SRTP key material (encrypted under pairing secret) | | ||
| | `SessionReject` | R → S | Policy deny | |
| |--------|-----|------|-------| | ||
| | Video | P | P+1 | Same as v1; payloads are SRTP when `sec=1` | | ||
| | Audio | A | A+1 | Same derivation as v1 | | ||
| | Control | **C** | — | QUIC over UDP/TCP; default **C = P + 4** | |
Comment on lines
+99
to
+101
| 1. Receiver generates ephemeral Ed25519 keypair; shows random 6-digit PIN (rotates every 5 min while waiting). | ||
| 2. Sender connects to `c_port`, runs **SPAKE2** with PIN as password; both derive `pairing_secret`. | ||
| 3. `PairAccept` includes receiver `device_id` and long-term public key. |
Comment on lines
+113
to
+116
| | Device identity | Ed25519 long-term key (generated on first run) | | ||
| | Pairing | SPAKE2 + HKDF | | ||
| | Control transport | QUIC + TLS 1.3 | | ||
| | Video / audio RTP | SRTP AES-128-GCM (RFC 3711) | |
Comment on lines
+221
to
+222
| - RFC 3711 — SRTP | ||
| - RFC 7748 / SPAKE2 — password-authenticated key exchange |
Comment on lines
+114
to
+115
| video_key, video_salt = HKDF-Expand(master_secret, "zerocast/v2/video", 30) | ||
| audio_key, audio_salt = HKDF-Expand(master_secret, "zerocast/v2/audio", 30) |
| audio_key, audio_salt = HKDF-Expand(master_secret, "zerocast/v2/audio", 30) | ||
| ``` | ||
|
|
||
| SRTP profile: AES-128-GCM, RTP auth tag 80 bits (RFC 7714). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.