ascon_prf

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_prf implements the Ascon-Mac, as specified in Section 2.5 of https://eprint.iacr.org/2021/1574.pdf.

Index

Constants

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

	// The tag size of Ascon-Mac in bytes.
	TagSize = 16

	// The blocksize of Ascon-Mac in bytes.
	BlockSize = 32
)

Variables

View Source
var ErrKeyLen = errors.New("ascon-prf: bad key length")

Functions

func NewMac

func NewMac(key []byte) (hash.Hash, error)

NewMac returns a Ascon-Mac PRF that uses the given 128-bit key.

Errors if the key is not 128 bits.

func ValidMAC

func ValidMAC(message, messageMAC, key []byte) (bool, error)

ValidMAC verifies if the given MAC and key is valid for the given message.

Errors if the key is not 128 bits.

Types

This section is empty.

Jump to

Keyboard shortcuts

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