sha256

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: 4 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

Types

type SHA256Circuit

type SHA256Circuit struct {
	// struct tag on a variable is optional
	// default uses variable name and secret visibility.
	PreImage frontend.Variable
	Hash     frontend.Variable `gnark:",public"`
}

Circuit defines a pre-image knowledge proof SHA256(secret preImage) = public hash

func (*SHA256Circuit) Define

func (circuit *SHA256Circuit) Define(curveID ecc.ID, api frontend.API) error

Define declares the circuit's constraints Hash = SHA256(PreImage)

Jump to

Keyboard shortcuts

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