Expand description
§trust-store
Web of Trust with TOFU (Trust-On-First-Use) key verification and social graph attestation for P2P networks.
§Features
- TOFU key pinning — pin a peer’s public key on first contact
- Key change detection — flag potential MITM attacks
- Social graph attestation — peers vouch for each other’s keys
- Computed trust scores — bubble trust through the graph with decay
- Ed25519 signature verification — cryptographically verify attestations
§Quick Start
use trust_store::TrustStore;
let store = TrustStore::new();
let key = vec![0x01u8; 32];
// First contact — TOFU pin
let is_new = store.verify_or_pin("peer1", &key).await.unwrap();
assert!(is_new);
// Second contact with same key — trusted
let is_new = store.verify_or_pin("peer1", &key).await.unwrap();
assert!(!is_new);§No PKI, No CA, No Blockchain
Pure peer attestation — like SSH known_hosts + web of trust combined.
Structs§
- Attestation
- A vouching attestation from one peer about another
- Peer
Record - Our record of a known peer
- Trust
Store - The trust store — manages all known peer records
Enums§
- Trust
Error - Errors that can occur during trust store operations.
- Trust
Level - Trust level for a known peer
Type Aliases§
- Trust
Result - Result type for trust store operations