[][src]Module torut::onion

Onion module implements all utilities required to work with onion addresses both version two and three Support for these may be enabled using cargo features.

Note: right now it uses openssl for v2 key generation and serialization If there would be a library mature capable of both RSA 1024 key generation and (de)serialization.

Structs

OnionAddressV2

OnionAddressV2 contains public part of Tor's onion service address version 2. It can't contain invalid onion address(

OnionAddressV3

OnionAddressV3 contains public part of Tor's onion service address version 3., It can't contain invalid onion address

TorPublicKeyV2

TorPublicKey describes onion service's public key V2(use to connect to onion service V2)

TorPublicKeyV3

TorPublicKeyV3 describes onion service's public key(use to connect to onion service)

TorSecretKeyV2

TorSecretKey describes onion service's secret key v2(used to host onion service v2)

TorSecretKeyV3

TorSecretKeyV3 describes onion service's secret key(used to host onion service) In fact it can be treated as keypair because public key may be derived from secret one quite easily.

Enums

OnionAddress
OnionAddressParseError
OnionAddressV2ParseError
TorPublicKey
TorSecretKey

Constants

TORV2_ONION_ADDRESS_LENGTH_BYTES
TORV3_ONION_ADDRESS_LENGTH_BYTES

32 public key bytes + 2 bytes of checksum = 34 (in onion address v3 there is one more byte - version eq to 3) Checksum is embbeded in order not to recompute it.

TORV3_PUBLIC_KEY_LENGTH

Standardises usage of Tor V3 public keys, which is 32 bytes (equal to Ed25519 public key length)

TORV3_SECRET_KEY_LENGTH

Standardises usage of Tor V3 secret keys, which is 65 bytes (equal to Ed25519 extended secret key length)