poseidon2

package
v0.0.0-...-4a97a7c Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidSizebuffer = errors.New("the size of the input should match the size of the hash buffer")
)

Functions

func InitRC

func InitRC(seed string, rf, rp, t int) [][]fr.Element

InitRC initiate round keys. Only one entry is non zero for the internal rounds, cf https://eprint.iacr.org/2023/323.pdf page 9

Types

type Hash

type Hash struct {
	// contains filtered or unexported fields
}

Hash stores the buffer of the poseidon2 permutation and provides poseidon2 permutation methods on the buffer

func NewHash

func NewHash(t, rf, rp int, seed string) Hash

NewHash returns a new hash instance allowing to apply the poseidon2 permutation

func (*Hash) Permutation

func (h *Hash) Permutation(input []fr.Element) error

Permutation applies the permutation on input, and stores the result in input.

Jump to

Keyboard shortcuts

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