hkdfchacha20poly1305

package
v0.21.1-rc1 Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2018 License: Apache-2.0, Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package hkdfchacha20poly1305 creates an AEAD using hkdf, chacha20, and poly1305 When sealing and opening, the hkdf is used to obtain the nonce and subkey for chacha20. Other than the change for the how the subkey and nonce for chacha are obtained, this is the same as chacha20poly1305

Index

Constants

View Source
const (
	// KeySize is the size of the key used by this AEAD, in bytes.
	KeySize = 32
	// NonceSize is the size of the nonce used with this AEAD, in bytes.
	NonceSize = 24
	// TagSize is the size added from poly1305
	TagSize = 16
	// MaxPlaintextSize is the max size that can be passed into a single call of Seal
	MaxPlaintextSize = (1 << 38) - 64
	// MaxCiphertextSize is the max size that can be passed into a single call of Open,
	// this differs from plaintext size due to the tag
	MaxCiphertextSize = (1 << 38) - 48
	// HkdfInfo is the parameter used internally for Hkdf's info parameter.
	HkdfInfo = "TENDERMINT_SECRET_CONNECTION_FRAME_KEY_DERIVE"
)

Variables

This section is empty.

Functions

func New

func New(key []byte) (cipher.AEAD, error)

New xChaChapoly1305 AEAD with 24 byte nonces

Types

This section is empty.

Jump to

Keyboard shortcuts

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