ascon_hash

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: 4 Imported by: 0

Documentation

Overview

Package ascon_hash implements the Ascon-Hash, Ascon-Hasha, Ascon-Xof and Asxon-Xofa, as specified in Section 2.5 of https://ascon.iaik.tugraz.at/files/asconv12-nist.pdf.

Index

Constants

View Source
const (
	// The blocksize of Ascon-Hash in bytes.
	BlockSize = 8

	// The hash size of Ascon-Hash in bytes.
	Size = 32
)

Variables

This section is empty.

Functions

func New

func New() hash.Hash

New returns a new hash.Hash computing the Ascon-Hash checksum.

func Newa

func Newa() hash.Hash

Newa returns a new hash.Hash computing the Ascon-Hasha checksum.

func Sum

func Sum(data []byte) [Size]byte

Sum returns the Ascon-Hash checksum of the data.

func Suma

func Suma(data []byte) [Size]byte

Suma returns the Ascon-Hasha checksum of the data.

Types

type Xof

type Xof interface {
	// Write absorbs more data into the hash's state. It panics if called
	// after Read.
	io.Writer

	// Read squuezes more data from the hash.
	io.Reader

	// Reset resets the XOF to its initial state.
	Reset()
}

Xof defines the interface to hash functions that support arbitrary-length output.

func NewXof

func NewXof() Xof

NewXof creates a new variable-output-length hash Ascon-Xof.

func NewXofa

func NewXofa() Xof

NewXofa creates a new variable-output-length hash Ascon-Xofa.

Jump to

Keyboard shortcuts

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