Module handshake

Source
Expand description

Circuit extension handshake for Tor.

Tor circuit handshakes all implement a one-way-authenticated key exchange, where a client that knows a public “onion key” for a relay sends a “client onionskin” to extend to a relay, and receives a “relay onionskin” in response. When the handshake is successful, both the client and relay share a set of session keys, and the client knows that nobody else shares those keys unless they relay’s private onion key.

Currently, this module implements only the “ntor” handshake used for circuits on today’s Tor.

Modules§

fast 🔒
Implementation for the (deprecated) CreateFast handshake.
hs_ntorhs-common
Implements the HS ntor key exchange, as used in v3 onion services.
ntor 🔒
Implements the ntor handshake, as used in modern Tor.
ntor_v3 🔒
Implements the ntor v3 key exchange, as described in proposal 332.

Structs§

ShakeKeyGenerator
Generates keys based on SHAKE-256.
TapKeyGenerator 🔒
Generates keys based on the KDF-TOR function.

Enums§

RelayHandshakeError 🔒
An error produced by a Relay’s attempt to handle a client’s onion handshake.

Traits§

AuxDataReply 🔒
Trait for an object that handles incoming auxiliary data and returns the server’s auxiliary data to be included in the reply.
ClientHandshake 🔒
A ClientHandshake is used to generate a client onionskin and handle a relay onionskin.
KeyGenerator
A KeyGenerator is returned by a handshake, and used to generate session keys for the protocol.
ServerHandshake 🔒
A ServerHandshake is used to handle a client onionskin and generate a server onionskin.

Type Aliases§

RelayHandshakeResult 🔒
Type alias for results from a relay’s attempt to handle a client’s onion handshake.