ascon_aead

package
v0.0.0-...-81a204c Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package ascon_aead implements the Ascon-128, Ascon-128a and Ascon-80pq AEAD, as specified in Section 2.4 of https://ascon.iaik.tugraz.at/files/asconv12-nist.pdf.

Index

Constants

View Source
const (
	// KeySize is the size of the key used by Ascon-128 and Ascon-128a, in bytes.
	KeySize = 16

	// KeySize80pq is the size of the key used by Ascon-80pq.
	KeySize80pq = 20

	// NonceSize is the size of the nonce used in bytes.
	//
	// Can safely be generated randomly or be a counter.
	NonceSize = 16

	// TagSize is the size of the authentication tag.
	TagSize = 16
)

Variables

View Source
var (
	ErrAsconBadMAC   = errors.New("ascon: message authentication failed")
	ErrAsconKeyLen   = errors.New("ascon: bad key length")
	ErrAsconNonceLen = errors.New("ascon: bad nonce length")
)

Functions

func New128

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

New128 returns a Ascon-128 AEAD that uses the given 128-bit key.

Errors if the key is not 128 bits.

func New128a

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

New128a returns a Ascon-128a AEAD that uses the given 128-bit key.

Errors if the key is not 128 bits.

func New80pq

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

New80pq returns a Ascon-80pq AEAD that uses the given 160-bit key.

Errors if the key is not 160 bits.

Types

This section is empty.

Jump to

Keyboard shortcuts

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