WeaveDocs

Threat Model

What an adversary can and cannot do in Weave, per-primitive guarantees, and the cryptographic assumptions.

What this page covers

Weave's security posture in concrete terms: which attacks are addressed by the design, which are out of scope, and which cryptographic assumptions the system relies on.

Trust boundaries

Every byte that crosses the trust boundary is signed by an Ed25519 key and addressed by a BLAKE3 hash. The verifier on the receiving side rejects anything that fails either check.

Adversary model

The reference adversary has these capabilities:

  • Network. Can read, drop, reorder, and inject arbitrary packets between any two peers.
  • Storage. Can read and modify any data on a compromised peer's disk.
  • Compute. Polynomial-bounded; cannot solve discrete log or invert BLAKE3 within the security parameter.
  • Identity. Does not have the private key of any honest participant.

The adversary cannot:

  • Forge an Ed25519 signature without the corresponding private key.
  • Find a preimage or second preimage for a BLAKE3 hash within the security parameter.
  • Compromise a peer's process memory at runtime (i.e. attacks are at network or disk boundaries).

Cryptographic assumptions

PrimitiveUsed forAssumption
Ed25519Block signatures, manifest signatures, identity proofsEdDSA security; 128-bit classical security
BLAKE3Content addressing (Strand blocks, Strand Blobs chunks, Weft chunks, Merkle roots)Collision and preimage resistance at 128-bit
X25519 + Noise IKzer0-secret-stream handshakeStandard Noise security model
ChaCha20-Poly1305zer0-secret-stream record encryptionIND-CCA2
Warning

If any of these primitives break, the affected guarantees in the per-primitive table below also break. Treat the assumptions as the security floor of the system.

Per-primitive guarantees

Strand

PropertyHolds against the adversary?Mechanism
Forge a block under another writer's DIDNoEd25519 signature on every block
Reorder blocks within a strandNoSequence numbers + Merkle proofs
Insert a block in the middleNoStrand is append-only; any insert invalidates the Merkle root
Drop a block silentlyNo (writer can detect missing blocks via the Merkle bitfield)
Force a fork on a single writerNo (a writer signs its own continuation)
Replay an old blockNoSequence numbers are unique and increasing
Read encrypted blocks without the keyNowith_encryption() enables per-block encryption

Strand Blobs

PropertyHolds?Mechanism
Serve corrupted blob bytesNoChunk ids are BLAKE3 hashes; readers verify before delivering
Substitute a different blob under a known idNoContent addressing

Lens

PropertyHolds?Mechanism
Forge an entry under another writerNoLens entries live inside a Strand
Roll back a value to an old versionPartialSnapshots and journal are signed; a peer can detect rollback by comparing log tips

Locus

PropertyHolds?Mechanism
Forge file metadataNoOperations are Strand blocks
Inject file contents that do not match the metadataNoContent hashes are part of the metadata block
Bypass permissions on a local mountNo (local) / Out of scope (remote)metadata-permissions.mdx describes the local enforcement

Forum

PropertyHolds?Mechanism
Inject a tuple under another writerNoAll writes go through the writer's Strand
Claim a tuple already taken by a different peerRace existsSee Distributed Coordination
Read a take you should not seePartialStrand is visible to anyone with replication access; encrypt at the Strand layer for confidentiality

Gnosis

PropertyHolds?Mechanism
Forge a triple from another subjectNo (signing happens at the Strand layer)
Substitute the answer to a queryNo (queries are local)
Insert spurious triples through a malicious peer with replication accessYes, if the peer is trusted to writeApply policy at the writer DID layer

Basis

PropertyHolds?Mechanism
Forge a vector entryNo (Strand-signed)
Cause search to return incorrect neighborsPartial — HNSW recall is approximate; an adversary cannot make a search miss arbitrary entries, but can construct inputs that have many near-equal distancesThis is the inherent property of HNSW

Weft

PropertyHolds?Mechanism
Serve corrupted chunk bytesNoBLAKE3 id verified on fetch
Substitute the manifestNoManifest is signed by producer DID
Claim authorship of someone else's manifestNoSignature is over the canonical manifest bytes (including the producer DID)
Refuse to serveYes (availability is not guaranteed)Sigil anchoring proves existence, not availability

weave-dht

PropertyHolds?Mechanism
Tamper with values at rest in the DHTNo for content-addressed records; Yes for mutable recordsUse content-addressing wherever possible
Eclipse a peer (control all its neighbors)Partial — DHT design uses α = 3 parallel queries and a wide k-bucketA determined adversary with many peers can still eclipse a single victim
Read DHT trafficYes; DHT records are not encrypted by defaultEncrypt sensitive content before storing

zer0-secret-stream

PropertyHolds?Mechanism
Read plaintext of a sessionNoNoise IK + ChaCha20-Poly1305
Replay a session frameNoPer-frame nonce, monotonic counters
MITM with a forged static keyNoNoise IK authenticates the responder's static key

What is explicitly out of scope

Warning

The following are not defended by Weave's design. Mitigations are operational, deployment-level, or out-of-band.

  • Denial of service. A determined adversary can flood any peer's network. Mitigations are operational (rate limiting at the OS, swarm scoring) — Weave does not include a built-in DoS defense.
  • Sybil-resistant peer admission. The DHT does not gate joiners. Treat peer ids as untrusted unless they are explicitly bound to a DID with a known root of trust.
  • Time-bound revocation. Identity revocation is a chain concern (Sigil); Weave primitives accept whatever the identity adapter resolves.
  • Confidentiality at rest on a compromised peer. If an attacker has full read access to a peer's disk, encrypted strands are still confidential, but any plaintext-stored data is exposed.

Defense in depth

The recommended deployment posture:

  1. Enable Strand::with_encryption() for confidential strands.
  2. Sign every cross-peer message at the application layer; do not rely solely on the transport.
  3. Use Weft + Sigil anchoring for content that must be provably published.
  4. Treat DHT records as public unless they are individually encrypted before storage.
  5. Wrap the DHT in weave-dht-daemon so an external process boundary contains adapter bugs.

Where to next