constants

package
v0.0.12 Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2021 License: AGPL-3.0 Imports: 1 Imported by: 20

Documentation

Overview

Package constants contains the constants for Katzenpost.

Index

Constants

View Source
const (
	// PacketLength is the length of a Sphinx Packet in bytes.
	PacketLength = sphinx.HeaderLength + sphinx.PayloadTagLength + ForwardPayloadLength

	// SphinxPlaintextHeaderLength is the length of a BlockSphinxPlaintext
	// in bytes.
	SphinxPlaintextHeaderLength = 1 + 1

	// ForwardPayloadLength is the length of the usable forward payload of a
	// Sphinx Packet in bytes.  This is named `SURB_PAYLOAD_LENGTH` in the
	// End to End spec due to packets constructed using a SURB having the
	// SURB's space available for payload.  The Sphinx spec calls this
	// `PAYLOAD_LENGTH`, since the Sphinx spec is agnostic to how SURBs are
	// transported.
	ForwardPayloadLength = 50 * 1024

	// UserForwardPayloadLength is the length of user portion of the forward
	// payload.  The End to End spec calls this `PAYLOAD_LENGTH` but this is
	// somewhat shorter than the `PAYLOAD_LENGTH` as defined in the Sphinx
	// spec.
	UserForwardPayloadLength = ForwardPayloadLength - (SphinxPlaintextHeaderLength + sphinx.SURBLength)
)

Variables

This section is empty.

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

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