route

package
v0.1.18 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 2, 2023 License: Unlicense Imports: 21 Imported by: 0

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

View Source
const (
	RouteMagic = "rout"
	RouteLen   = magic.Len +
		crypto.CloakLen +
		crypto.PubKeyLen +
		nonce.IVLen +
		nonce.IDLen +
		3*sha256.Len +
		3*nonce.IVLen
)

Variables

This section is empty.

Functions

func NewRoute

func NewRoute(id nonce.ID, k *crypto.Pub, ks *crypto.KeySet,
	ep *exit.ExitPoint) ont.Onion

func RouteGen

func RouteGen() coding.Codec

Types

type Route

type Route struct {
	HiddenService *crypto.Pub
	HiddenCloaked crypto.CloakedPubKey
	Sender        *crypto.Prv
	SenderPub     *crypto.Pub
	nonce.IV
	// ------- the rest is encrypted to the HiddenService/Sender keys.
	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
	hidden.RoutingHeaderBytes
	ont.Onion
}

func (*Route) Account

func (x *Route) Account(res *sess.Data, sm *sess.Manager,
	s *sessions.Data, last bool) (skip bool, sd *sessions.Data)

func (*Route) Decode

func (x *Route) Decode(s *splice.Splice) (e error)

func (*Route) Decrypt

func (x *Route) Decrypt(prk *crypto.Prv, s *splice.Splice)

Decrypt decrypts the rest of a message after the Route segment if the recipient has the hidden service private key.

func (*Route) Encode

func (x *Route) Encode(s *splice.Splice) (e error)

func (*Route) GetOnion

func (x *Route) GetOnion() interface{}

func (*Route) Handle

func (x *Route) Handle(s *splice.Splice, p ont.Onion, ng ont.Ngin) (e error)

func (*Route) Len

func (x *Route) Len() int

func (*Route) Magic

func (x *Route) Magic() string

func (*Route) Wrap

func (x *Route) Wrap(inner ont.Onion)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL