poseidon

package
v0.0.0-...-7d347a5 Latest Latest
Warning

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

Go to latest
Published: Dec 30, 2021 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// n = floor(log2(Q))
	N     = 253
	SeedC = "poseidon_constants"
	SeedM = "poseidon_matrix_0000"
)

Variables

This section is empty.

Functions

func Hash

func Hash(inpbi []*big.Int, params PoseidonParams) (*big.Int, error)

calculate the poseidon hash

Types

type PoseidonParams

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

func NewPoseidonParams

func NewPoseidonParams(t int, nRoundsF int, nRoundsP int, securityTarget int) (*PoseidonParams, error)

get the param will use in the poseidon permutation(return err if param is not valid as poseidon params)

Jump to

Keyboard shortcuts

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