tor_hscrypto/
pow.rs

1//! Proof of Work schemes for onion services
2//!
3//! Tor supports optional proof-of-work client puzzles, for mitigating denial of
4//! service attacks on onion services. This crate implements the specific puzzle
5//! algorithms we use, and components for client and service integration.
6//!
7//! There is infrastructure to support new algorithms over time, but right now
8//! only a single algorithm is defined, named [`v1`] and implemented via the
9//! `equix` crate.
10//!
11//! Specification at: <https://spec.torproject.org/hspow-spec/index.html>
12
13mod err;
14
15#[cfg_attr(not(feature = "hs-pow-full"), path = "pow/v1_stub.rs")]
16pub mod v1;
17
18pub use err::{Error, RuntimeError, SolutionError};