Skip to content

Privacy analysis across the entire protocol #45

Closed

Description

@thiras

Summary

The protocol makes several deliberate privacy tradeoffs favoring decentralization and accountability over privacy. These are scattered across individual ADRs without a unified privacy analysis. We need a dedicated ADR (or section in architecture.md) that consolidates the full privacy surface, documents accepted risks, and identifies gaps that may need mitigation.

Privacy Surface Areas

1. Content Access Pattern Leakage

  • Probe fan-out (cdn/probe/v1): When a client probes peers for a content hash, all probed nodes learn what content is being requested. With network-wide visibility, an adversary can build a content access map.
  • Gossip popular_hashes: NodeAnnounce messages broadcast the top-20 most-requested hashes per node to the entire network (ADR 001). This is a deliberate design choice but creates a demand-pattern signal.
  • BLAKE3 hash as global identifier: The same content always produces the same hash. Repeated requests for the same hash by the same client are observable and correlatable.
  • Cache miss detection: Probe fan-outs triggered by cache misses are visible to all peers, revealing regionally uncommon or newly requested content.
  • 30-second probe cache: Timing correlation between probe and subsequent StreamRequest is trivially observable.

2. Payment Channel Privacy

  • On-chain linkability: Channel IDs, client/provider Ethereum addresses, and settlement events are permanently visible on-chain. A client's payment behavior is linked to a persistent identity.
  • Watchtower voucher visibility: Voucher updates streamed to watchtowers (ADR 007) expose cumulative bytes delivered, update frequency, and session duration. ADR 007 acknowledges this: "Voucher sharing exposes channel activity patterns (amounts, frequency) to the watchtower."
  • Node earnings visibility: All channel closures are on-chain, making node operator revenue publicly observable.
  • Minimal deposit Sybil risk: 1 USDC minimum deposit means clients can create disposable channels, but sophisticated on-chain analysis can still correlate them.

3. Node Identity & Discovery

  • Permanent nodeId: ed25519 keys are permanent and tied to staking — all activity is correlated under one identity. This is deliberate (accountability for slashing) but worth documenting.
  • On-chain registry: StakingRegistry publicly exposes nodeId, ethAddress, multiaddrs, regionHint, and registration timestamps.
  • GeoIP inference: Self-reported regionHint combined with IP addresses from multiaddrs enables geolocation.
  • Gossip topic enumeration: An attacker can enumerate all nodes and their region announcements by joining regional gossip topics.

4. Reputation System

  • Gossip reports (ADR 008): Signed ReputationReport messages on reputation/v1 broadcast provider, reporter, metrics, and timestamps. No privacy analysis exists for this data surface.
  • Reporter credibility leakage: Weighted by settled_channels(reporter), which is observable on-chain — reveals a reporter's payment history.

5. Encryption & Key Distribution

  • App server as privacy boundary (ADR 006): The app server sees which clients access which content and when (via POST /play and WebSocket connections). This is acknowledged as outside CDN scope but has real privacy implications.
  • Offline lease persistence: Up to 500 track keys can be extracted from a compromised device (30-day lease window).
  • ALPN protocol identification: QUIC TLS ClientHello reveals which ALPN is being negotiated, allowing observers to distinguish probing, fetching, and watchtower activity.

Accepted Tradeoffs (documented across ADRs)

Decision Rationale ADR
Probe responses are public Resource exhaustion is the concern, not information leakage 003, 005
Network topology is discoverable Inherent to any system where nodes must be discoverable 005
Payment channels are on-chain Required for dispute resolution and slashing 003
Watchtowers see voucher patterns Low impact — counterparty already has vouchers 007
App server sees access patterns Outside CDN scope; content provider's responsibility 006

Gaps Without Mitigation

Concern Status
Cleartext hash in StreamRequest / ProbeRequest Not addressed
Gossip topic enumeration Not addressed
Reputation gossip privacy No analysis exists
Payment channel on-chain linking Acknowledged but no mitigation discussed
Client-side probe obfuscation (dummy probes) Not discussed
App server data minimization guidelines Acknowledged as out-of-scope but no guidance given

Proposed Action

  • Create a dedicated privacy ADR that consolidates the above analysis
  • For each accepted tradeoff, document the threat model and why it's acceptable for PoC scope
  • For each gap, decide: accept (with rationale), mitigate (with design), or defer (with milestone)
  • Consider whether any mitigations (e.g., client nodeId rotation, dummy probes, payment channel mixing) should be prioritized before mainnet

Activity

  1. added
    kind:docs
    kind:security
    status:blocked
    on Mar 30, 2026
  2. reopened this on Apr 3, 2026
  3. self-assigned this
    on Apr 4, 2026
  4. added a commit that references this issue on Apr 4, 2026
    4aa3cc6
  5. added a commit that references this issue on Apr 4, 2026
    adb0a6e
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

kind:docskind:securitystatus:blocked

Type

No type

Fields

Priority

None yet

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions