Skip to main content

Module pk

Module pk 

Source
Expand description

Key type wrappers of various kinds used in onion services.

(We define wrappers here as a safety net against confusing one kind of key for another: without a system like this, it can get pretty hard making sure that each key is used only in the right way.)

Re-exportsΒ§

use std::fmt; πŸ”’
use std::fmt::Debug; πŸ”’
use std::fmt::Debug; πŸ”’
use std::fmt::Display; πŸ”’
use std::str::FromStr; πŸ”’
use derive_deftly::Deftly; πŸ”’
use digest::Digest; πŸ”’
use itertools::Itertools; πŸ”’
use itertools::chain; πŸ”’
use itertools::chain; πŸ”’
use safelog::DisplayRedacted; πŸ”’
use safelog::util::write_end_redacted; πŸ”’
use subtle::ConstantTimeEq; πŸ”’
use thiserror::Error; πŸ”’
use tor_basic_utils::StrExt as _; πŸ”’
use tor_basic_utils::impl_debug_hex; πŸ”’
use tor_key_forge::ToEncodableKey; πŸ”’
use tor_llcrypto::d::Sha3_256; πŸ”’
use tor_llcrypto::pk::ed25519::Ed25519PublicKey; πŸ”’
use tor_llcrypto::pk::ed25519::Ed25519SigningKey; πŸ”’
use tor_llcrypto::pk::curve25519; πŸ”’
use tor_llcrypto::pk::ed25519; πŸ”’
use tor_llcrypto::pk::keymanip; πŸ”’
use tor_llcrypto::util::ct::CtByteArray; πŸ”’
use tor_llcrypto::derive_deftly_template_ConstantTimeEq; πŸ”’
use tor_llcrypto::derive_deftly_template_PartialEqFromCtEq; πŸ”’
use crate::macros::define_bytes; πŸ”’
use crate::macros::define_pk_keypair; πŸ”’
use crate::time::TimePeriod; πŸ”’
pub use hs_client_intro_auth::HsClientIntroAuthKey;Deprecated
pub use hs_client_intro_auth::HsClientIntroAuthKeypair;Deprecated

ModulesΒ§

hs_client_intro_auth πŸ”’
Key type wrappers for the deprecated HsClientIntroKey/HsClientIntroKeypair types.

StructsΒ§

HsBlindId
A blinded onion service identity, represented in a compact format. (KP_hs_blind_id)
HsBlindIdKey
The β€œblinded” identity of a v3 onion service. (KP_hs_blind_id)
HsBlindIdKeypair
The private counterpart of a HsBlindIdKey.
HsClientDescEncKey
Client service discovery key, used for onion descriptor decryption. (KP_hsc_desc_enc)
HsClientDescEncKeypair
A pair of a public and private components for a HsClientDescEncKey.
HsClientDescEncSecretKey
The private counterpart of a HsClientDescEncKey.
HsDescSigningKey
A key used to sign onion service descriptors. (KP_desc_sign)
HsDescSigningKeypair
The private counterpart of a HsDescSigningKey.
HsId
The identity of a v3 onion service. (KP_hs_id)
HsIdKey
The identity of a v3 onion service, expanded into a public key. (KP_hs_id)
HsIdKeypair
The private counterpart of a HsIdKey.
HsIntroPtSessionIdKey
A key used to identify and authenticate an onion service at a single introduction point. (KP_hs_ipt_sid)
HsIntroPtSessionIdKeypair
The private counterpart of a HsIntroPtSessionIdKey.
HsSvcDescEncKey
Server key, used for diffie hellman during onion descriptor decryption. (KP_hss_desc_enc)
HsSvcDescEncKeypair
An ephemeral x25519 keypair, generated by an onion service and used to for onion service encryption.
HsSvcDescEncSecretKey
The private counterpart of a HsSvcDescEncKey.
HsSvcNtorKey
A key used in the HsNtor handshake between the client and the onion service. (KP_hss_ntor)
HsSvcNtorKeypair
A pair of a public and private components for a HsSvcNtorKey.
HsSvcNtorSecretKey
The private counterpart of a HsSvcNtorKey.

EnumsΒ§

HsClientDescEncKeyParseError
Error that can occur parsing an HsClientDescEncKey from C Tor format.
HsIdParseError
Error that can occur parsing an HsId from a v3 .onion domain name

ConstantsΒ§

HSID_ONION_SUFFIX
The fixed string .onion
HSID_ONION_VERSION πŸ”’
VERSION from rend-spec-v3 s.6 [ONIONADDRESS]