Skip to main content

Crate cp_tor

Crate cp_tor 

Source
Expand description

Anonymous search protocol over Tor for Canon Protocol (CP-013).

This crate implements the protocol layer for live anonymous search between Canon nodes. It provides:

  • Data structures for peer registration, search requests/responses
  • Length-prefixed CBOR wire format for stream communication
  • Ephemeral session key derivation for query privacy
  • Token bucket rate limiting per requester

The actual Tor integration (arti-client) is handled separately to keep this crate lightweight and testable without a Tor dependency.

Re-exports§

pub use client::search;
pub use client::search_fanout;
pub use client::verify_response;
pub use error::Result;
pub use error::TorError;
pub use keys::derive_onion_keypair;
pub use keys::node_id_from_public_key;
pub use keys::verify_signature;
pub use keys::SessionKey;
pub use rate_limit::RateLimiter;
pub use runtime::RuntimeState;
pub use runtime::TorConfig;
pub use runtime::TorRuntime;
pub use server::handle_connection;
pub use server::handle_connection_loop;
pub use server::ServerConfig;
pub use wire::read_message;
pub use wire::write_keepalive;
pub use wire::write_message;
pub use types::*;

Modules§

client
Search client: sends search requests to remote peers.
error
Error types for the Canon Tor protocol layer.
keys
Ephemeral key derivation for Canon search sessions.
rate_limit
Token bucket rate limiter for Canon search protocol.
runtime
Tor runtime: manages Arti bootstrap, circuit pool, and onion service.
server
Search server: handles incoming search requests from remote peers.
types
CP-013 protocol data structures for live anonymous search.
wire
Length-prefixed wire format for Canon search protocol messages.