core: github.com/katzenpost/core/constants Index | Files

package constants

import "github.com/katzenpost/core/constants"

Package constants contains the constants for Katzenpost.

Index

Package Files

constants.go

Constants

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)
)

Package constants imports 1 packages (graph) and is imported by 12 packages. Updated 2018-01-23. Refresh now. Tools for package owners.