snark

package
v0.2.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Init

func Init(treeDepth uint, keyDir string)

func ProveShielding

func ProveShielding(rho []byte, pk []byte, value uint64) []byte

func ProveTransfer

func ProveTransfer(inputRho1 []byte,
	inputSk1 []byte,
	inputValue1 uint64,
	inputTreeIndex1 uint64,
	inputTreePath1 [][]byte,
	inputRho2 []byte,
	inputSk2 []byte,
	inputValue2 uint64,
	inputTreeIndex2 uint64,
	inputTreePath2 [][]byte,
	outputRho1 []byte,
	outputPk1 []byte,
	outputValue1 uint64,
	outputRho2 []byte,
	outputPk2 []byte,
	outputValue2 uint64) []byte

func ProveUnshielding

func ProveUnshielding(rho []byte,
	sk []byte,
	value uint64,
	treeIndex uint64,
	treePath [][]byte) []byte

func VerifyShielding

func VerifyShielding(proof []byte, sendNullifier []byte, commitment []byte, value uint64) bool

func VerifyTransfer

func VerifyTransfer(proof []byte,
	treeRoot []byte,
	spendNullifier1 []byte,
	spendNullifier2 []byte,
	sendNullifier1 []byte,
	sendNullifier2 []byte,
	commitment1 []byte,
	commitment2 []byte) bool

func VerifyUnshielding

func VerifyUnshielding(proof []byte, spendNullifier []byte, treeRoot []byte, value uint64) bool

Types

This section is empty.

Jump to

Keyboard shortcuts

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