Skip to content

Add Phase Security v0 design docs and protocol v2 draft. - #10

Open
YanChao1999 wants to merge 1 commit into
mainfrom
phase-security/v0-design
Open

Add Phase Security v0 design docs and protocol v2 draft.#10
YanChao1999 wants to merge 1 commit into
mainfrom
phase-security/v0-design

Conversation

@YanChao1999

Copy link
Copy Markdown
Owner

No description provided.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 thread docs/PHASE-SECURITY.md
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 thread docs/PHASE-SECURITY.md
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 thread docs/PHASE-SECURITY.md
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).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants