Skip to main content

Module ntor

Module ntor 

Source
Expand description

Implements the ntor handshake, as used in modern Tor.

Re-exportsยง

use std::borrow::Borrow; ๐Ÿ”’
use std::marker::PhantomData; ๐Ÿ”’
use super::AuxDataReply; ๐Ÿ”’
use super::KeyGenerator; ๐Ÿ”’
use super::RelayHandshakeError; ๐Ÿ”’
use super::RelayHandshakeResult; ๐Ÿ”’
use crate::util::ct; ๐Ÿ”’
use crate::Error; ๐Ÿ”’
use crate::Result; ๐Ÿ”’
use subtle::Choice; ๐Ÿ”’
use subtle::ConstantTimeEq; ๐Ÿ”’
use tor_bytes::EncodeResult; ๐Ÿ”’
use tor_bytes::Reader; ๐Ÿ”’
use tor_bytes::SecretBuf; ๐Ÿ”’
use tor_bytes::Writer; ๐Ÿ”’
use tor_error::into_internal; ๐Ÿ”’
use tor_llcrypto::d; ๐Ÿ”’
use tor_llcrypto::pk::rsa::RsaIdentity; ๐Ÿ”’
use tor_llcrypto::util::ct::ct_lookup; ๐Ÿ”’
use digest::KeyInit; ๐Ÿ”’
use digest::Mac; ๐Ÿ”’
use rand_core::CryptoRng; ๐Ÿ”’
use rand_core::Rng; ๐Ÿ”’
use tor_llcrypto::pk::curve25519::*; ๐Ÿ”’

Structsยง

NtorClient ๐Ÿ”’
Client side of the Ntor handshake.
NtorHandshakeState ๐Ÿ”’
Client state for an ntor handshake.
NtorHkdfKeyGenerator ๐Ÿ”’
KeyGenerator for use with ntor circuit handshake.
NtorPublicKey ๐Ÿ”’
A set of public keys used by a client to initiate an ntor handshake.
NtorServer ๐Ÿ”’
Server side of the ntor handshake.

Traitsยง

NtorServerKeys ๐Ÿ”’
An object holding the keys necessary for a server-side ntor handshake.

Functionsยง

client_handshake2_ntor_v1 ๐Ÿ”’
Complete a client handshake, returning a key generator on success.
client_handshake_ntor_v1 ๐Ÿ”’
Perform a client handshake, generating an onionskin and a state object
client_handshake_ntor_v1_no_keygen ๐Ÿ”’
Helper: client handshake without generating new keys.
ntor_derive ๐Ÿ”’
helper: compute a key generator and an authentication code from a set of ntor parameters.
server_handshake_ntor_v1 ๐Ÿ”’
Perform a server-side ntor handshake.
server_handshake_ntor_v1_no_keygen ๐Ÿ”’
Helper: perform a server handshake without generating any new keys.

Type Aliasesยง

Authcode ๐Ÿ”’
Alias for an HMAC output, used to validate correctness of a handshake.