ascon

package
v1.0.2065 Latest Latest
Warning

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

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

Documentation

Overview

Package ascon implements the ASCON AEAD cipher.

References:

[ascon]: https://ascon.iaik.tugraz.at

Index

Constants

View Source
const (
	// BlockSize128a is the size in bytes of an ASCON-128a block.
	BlockSize128a = 16
	// BlockSize128 is the size in bytes of an ASCON-128 block.
	BlockSize128 = 8
	// KeySize is the size in bytes of ASCON-128 and ASCON-128a
	// keys.
	KeySize = 16
	// NonceSize is the size in bytes of ASCON-128 and ASCON-128a
	// nonces.
	NonceSize = 16
	// TagSize is the size in bytes of ASCON-128 and ASCON-128a
	// authenticators.
	TagSize = 16
)

Variables

This section is empty.

Functions

func New128

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

New128 creates a 128-bit ASCON-128 AEAD.

ASCON-128 provides lower throughput but increased robustness against partial or full state recovery compared to ASCON-128a.

Each unique key can encrypt a maximum 2^68 bytes (i.e., 2^64 plaintext and associated data blocks). Nonces must never be reused with the same key. Violating either of these constraints compromises the security of the algorithm.

There are no other constraints on the composition of the nonce. For example, the nonce can be a counter.

Refer to ASCON's documentation for more information.

func New128a

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

New128a creates a 128-bit ASCON-128a AEAD.

ASCON-128a provides higher throughput but reduced robustness against partial or full state recovery compared to ASCON-128.

Each unique key can encrypt a maximum 2^68 bytes (i.e., 2^64 plaintext and associated data blocks). Nonces must never be reused with the same key. Violating either of these constraints compromises the security of the algorithm.

There are no other constraints on the composition of the nonce. For example, the nonce can be a counter.

Refer to ASCON's documentation for more information.

Types

This section is empty.

Jump to

Keyboard shortcuts

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