Documentation ¶
Overview ¶
Package ascon implements the ASCON AEAD cipher.
Index ¶
Constants ¶
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 ¶
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 ¶
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.