Module v1

Source
Expand description

v1 client puzzle using equix

This was the first proof-of-work scheme defined for Tor, and currently it’s the only one we have.

Originally defined in proposal 327, and now part of the main specification: https://spec.torproject.org/hspow-spec/index.html

Structs§

Effort
Effort setting, a u32 value with linear scale
Instance
One instance of this proof-of-work puzzle
Nonce
Generated randomly by solvers and included in the solution
Seed
The random portion of a challenge, distributed through HsDir
SeedHead
A short seed prefix used in solutions to reference the complete seed
Solution
One potential solution to some puzzle Instance
Solver
Make progress toward finding a Solution.
SolverInput
All inputs necessary to run the Solver
Verifier
Checker for potential Solutions to a particular puzzle Instance

Enums§

ParseSeedError
Error when converting a string to a Seed.
RuntimeErrorV1
Protocol-specific runtime errors
RuntimeOption
Option for selecting a HashX runtime
SolutionErrorV1
Protocol-specific ways a solution can fail verification

Constants§

NONCE_LEN
Length of the nonce value generated by clients and included in the solution
SEED_HEAD_LEN
Length of a seed prefix used to identify the entire seed
SEED_LEN
Length of the random seed generated by servers and included in HsDir

Type Aliases§

SolutionByteArray
A byte array of the right length to convert to/from a Solution