hash

package
v0.0.0-...-783462d Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2022 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package hash provides MiMC hash function defined over curves implemented in gnark-crypto/ecc.

Originally developed and used in a ZKP context.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Hash

type Hash uint
const (
	MIMC_BN254 Hash = iota
	MIMC_BLS12_381
	MIMC_BLS12_377
	MIMC_BLS12_378
	MIMC_BW6_761
	MIMC_BLS24_315
	MIMC_BLS24_317
	MIMC_BW6_633
	MIMC_BW6_756
)

func (Hash) New

func (m Hash) New() hash.Hash

New creates the corresponding mimc hash function.

func (Hash) Size

func (m Hash) Size() int

Size returns the size of the digest of the corresponding hash function

func (Hash) String

func (m Hash) String() string

String returns the mimc ID to string format.

Jump to

Keyboard shortcuts

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