mimc

package
v0.0.0-...-b124b1e Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCircuit

func NewCircuit() (frontend.CompiledConstraintSystem, error)

NewCircuit return the circuit implementing a pre image check

func Prove

Prove generate a zkp proof using ProvingKey

func Verify

func Verify(proof groth16.Proof, vk groth16.VerifyingKey, hashResult []byte) (bool, error)

Verify verify a zkp proof using VerifyingKey

Types

type ZkpInfo

type ZkpInfo struct {
	R1CS         frontend.CompiledConstraintSystem
	ProvingKey   groth16.ProvingKey
	VerifyingKey groth16.VerifyingKey
}

ZkpInfo includes CompiledConstraintSystem、ProvingKey、VerifyingKey

func Setup

func Setup() (*ZkpInfo, error)

Setup generate CompiledConstraintSystem, ProvingKey and VerifyingKey

Jump to

Keyboard shortcuts

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