Documentation
¶
Overview ¶
Package route provides an onion mesage type that initiates a hidden service connection with a designated introducer who holds the forwarding routing header to send the route message to a hidden service, who replies to the client using their reply routing header with a ready message.
Index ¶
- Constants
- func Gen() codec.Codec
- func New(id nonce.ID, k *crypto.Pub, ks *crypto.KeySet, ep *exit.ExitPoint) ont.Onion
- type Route
- func (x *Route) Account(res *sess.Data, sm *sess.Manager, s *sessions.Data, last bool) (skip bool, sd *sessions.Data)
- func (x *Route) Decode(s *splice.Splice) (e error)
- func (x *Route) Decrypt(prk *crypto.Prv, s *splice.Splice)
- func (x *Route) Encode(s *splice.Splice) (e error)
- func (x *Route) Handle(s *splice.Splice, p ont.Onion, ng ont.Ngin) (e error)
- func (x *Route) Len() int
- func (x *Route) Magic() string
- func (x *Route) Unwrap() interface{}
- func (x *Route) Wrap(inner ont.Onion)
Constants ¶
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Route ¶
type Route struct {
// HiddenService is the public key of the hidden service.
HiddenService *crypto.Pub
// HiddenCloaked is the cloaked key generated to conceal the session identity.
HiddenCloaked crypto.CloakedPubKey
// Sender is the ephemeral sender private key for this message.
Sender *crypto.Prv
// SenderPub is the key used by the receiver with their session private keys to
// decrypt the message payload.
SenderPub *crypto.Pub
// IV is the initialization vector for the encryption to be used.
nonce.IV
// ID is a unique
// identifier for the Ready message to enable the client to identify quickly
// which hidden service has become ready.
ID nonce.ID
// Ciphers is a set of 3 symmetric ciphers that are to be used in their given
// order over the reply message from the service.
Ciphers crypto.Ciphers
// Nonces are the nonces to use with the cipher when creating the encryption for
// the reply message, they are common with the crypts in the header.
crypto.Nonces
// RoutingHeaderBytes are the three layer routing header that will be used for
// the reply from the client.
hidden.RoutingHeaderBytes
// Onion contains the rest of the message.
ont.Onion
}
Route is a message to establish a connection to a HiddenService.
func (*Route) Account ¶
func (x *Route) Account(res *sess.Data, sm *sess.Manager, s *sessions.Data, last bool) (skip bool, sd *sessions.Data)
Account for the Route message. Basically standard relay fee for the Introducer.
func (*Route) Decrypt ¶
Decrypt decrypts the rest of a message after the Route segment if the recipient has the hidden service private key.
Click to show internal directories.
Click to hide internal directories.