Secure Scuttlebutt (SSB)
SSB is a P2P protocol for social applications, built on append-only logs and the social graph. It uniquely uses human relationships as the routing and trust substrate.
Architecture
Each SSB user has a single append-only log (feed), signed with their Ed25519 identity key:
Messages are hash-linked: each references the hash of the previous message, forming a tamper-evident chain. See Content Addressing.
The feed ID is the public key—a self-certifying identity.
Messages are JSON objects with a type field (post, vote, contact, about, etc.).
Social Graph as Infrastructure
SSB uses the follow graph for both social and technical purposes:
Replication scope: you replicate feeds of people you follow, and optionally friends-of-friends (hops=2 or 3). This naturally limits what each node stores.
Trust/blocking: unfollowing stops replication; blocking excludes a peer entirely from your view.
Sybil resistance: fake identities are irrelevant if nobody follows them. The social graph is the admission control.
No DHT needed: discovery is social, not key-based.
Gossip Replication
SSB syncs via gossip, embodying the offline-first pattern:
Peers connect (LAN, internet, Bluetooth, or even USB drives) and exchange feed data they're each missing. See State Sync.
Pub servers: always-online peers that store and forward feeds, acting as superpeers. Joining a pub means the pub follows you and replicates your feed.
Rooms: relay servers that connect peers for direct replication without storing data themselves.
Secret handshake (SHS): a custom authenticated key exchange for transport security that also hides the server's identity from unauthenticated clients.
Private Messages
SSB supports private messages encrypted to up to 7 recipients using a box construction ("private-box"). Messages are published to the feed (visible as encrypted blobs) but only readable by designated recipients. This provides privacy without a separate messaging channel.
Applications
Patchwork / Patchbay / Manyverse / Planetary: social network clients.
git-ssb: decentralized git hosting.
ssb-chess: a chess game played over feeds.
Dark Crystal: secret sharing for key backup using SSB social graph.
Limitations and Evolution
Single-writer feeds make multi-device use awkward (requires feed migration or delegation). Compare with Hypercore Autobase for multi-writer approaches.
Unbounded growth: append-only logs grow forever; compaction and partial replication are active research.
SSB Classic vs SSB-NG (Bamboo/Buttwoo): newer feed formats address performance, partial replication, and flexibility.
Compliance: immutable feeds conflict with right-to-erasure laws.
How SSB Connects to Everything Else
SSB shares the append-only log model with Hypercore and the gossip sync model with Real-time Messaging. Its social-graph-as-infrastructure approach contrasts with key-agnostic DHT routing. Identity is deeply integrated—the feed ID is the key. Storage relies on community altruism (pub operators). Testing requires modeling social graph topologies and their effect on message propagation.
Do you like what you are reading? Subscribe to receive updates.
Unsubscribe anytime