grain

package
v1.0.3019 Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2024 License: Apache-2.0 Imports: 10 Imported by: 1

Documentation

Index

Constants

View Source
const (
	// BlockSize is the size in bytes of an Grain128-AEAD block.
	BlockSize = 16
	// KeySize is the size in bytes of an Grain128-AEAD key.
	KeySize = 16
	// NonceSize is the size in bytes of an Grain128-AEAD nonce.
	NonceSize = 12
	// TagSize is the size in bytes of an Grain128-AEAD
	// authenticator.
	TagSize = 8
)

Variables

This section is empty.

Functions

func NewCipher added in v1.0.3015

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

NewCipher creates a 128-bit Grain128-AEAD AEAD.

Grain128-AEAD must not be used to encrypt more than 2^80 bits per key, nonce pair, including additional authenticated data.

func NewStreamCipher added in v1.0.3015

func NewStreamCipher(key, nonce []byte) (cipher.Stream, error)

NewCipher creates a Grain128a stream cipher.

Grain128a must not be used to encrypt more than 2^80 bits per key, nonce pair.

Types

This section is empty.

Jump to

Keyboard shortcuts

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