Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateProofHelper ¶
GenerateProofHelper generates an array of 1 or 0 telling if during the proof verification the hash to compute is h(sum, proof[i]) or h(proof[i], sum). The size of the resulting slice is len(proofSet)-1. cf gitlab.com/NebulousLabs/merkletree for the algorithm
func VerifyProof ¶
func VerifyProof(cs *frontend.ConstraintSystem, h mimc.MiMC, merkleRoot frontend.Variable, proofSet, helper []frontend.Variable)
VerifyProof takes a Merkle root, a proofSet, and a proofIndex and returns true if the first element of the proof set is a leaf of data in the Merkle root. False is returned if the proof set or Merkle root is nil, and if 'numLeaves' equals 0.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.