zksnark

package
v0.0.0-...-e03aae4 Latest Latest
Warning

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

Go to latest
Published: May 6, 2022 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Overview

nolint:gocritic

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Circuit

func Circuit(inputValue [64]byte) [32]byte

Old version

func GenerateKeys

func GenerateKeys(constraintsLen uint64) (pk []byte, vk []byte)

GenerateKeys returns newly generated PK and VK.

func Init

func Init()

func Prove

func Prove(hashInput []byte, pk []byte, constraintsLen uint64) (proof []byte, err error)

Prove generates proof depended on hashInput and PK.

func ProveTransfer

func ProveTransfer(hashInput [64]byte, auxiliaryPerConstraint uint64) ([259]byte, [5058]byte)

Old version

func Verify

func Verify(proof []byte, vk []byte, hashInput []byte) (bool, error)

Verify verifies hashInput depended on proof and VK.

func VerifyTransfer

func VerifyTransfer(proof [259]byte, vk [5058]byte, hashInput [64]byte) bool

Old version

func VerifyTransferByHash

func VerifyTransferByHash(proof [259]byte, vk [5058]byte, inputHash [32]byte) bool

Old version

Types

This section is empty.

Jump to

Keyboard shortcuts

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