Documentation ¶
Index ¶
- Constants
- Variables
- func BigInts2DtoElements2D[E Element[E]](bi [][]*big.Int) [][]E
- func BigIntsToElements[E Element[E]](bi []*big.Int) []E
- func Exp[E Element[E]](z, x E, k *big.Int)
- func Hash[E Element[E]](inpBI []*big.Int) (*big.Int, error)
- func HashBytes[E Element[E]](msg []byte) (*big.Int, error)
- func HashBytesX[E Element[E]](msg []byte, frameSize int) (*big.Int, error)
- func HashEx[E Element[E]](inpBI []*big.Int, initialState *big.Int) (*big.Int, error)
- func HashMulti[E Element[E]](inpBI []*big.Int) (*big.Int, error)
- func Modulus[E Element[E]]() *big.Int
- func NewElement[E Element[E]]() E
- func SpongeHash[E Element[E]](inputs []*big.Int) (*big.Int, error)
- func SpongeHashX[E Element[E]](inputs []*big.Int, frameSize int) (*big.Int, error)
- type Element
Constants ¶
View Source
const NROUNDSF = 8
NROUNDSF constant from Poseidon paper
Variables ¶
View Source
var NROUNDSP = []int{56, 57, 56, 60, 60, 63, 64, 63, 60, 66, 60, 65, 70, 60, 64, 68}
NROUNDSP constant from Poseidon paper
Functions ¶
func BigInts2DtoElements2D ¶
func BigIntsToElements ¶
func HashBytesX ¶
HashBytesX returns a sponge hash of a msg byte slice split into blocks of 31 bytes
func NewElement ¶
func NewElement[E Element[E]]() E
func SpongeHash ¶
SpongeHash returns a sponge hash of inputs (using Poseidon with frame size of 16 inputs)
Types ¶
Click to show internal directories.
Click to hide internal directories.