Isolate verification to a ProofVerifier context object that allows verification behavior to be tuned by the caller.

This commit is contained in:
Sean Bowe
2016-11-24 00:03:12 -07:00
parent 4e3ac9b015
commit bc59f53722
12 changed files with 105 additions and 20 deletions

View File

@@ -70,10 +70,12 @@ JSDescription JSDescription::Randomized(
bool JSDescription::Verify(
ZCJoinSplit& params,
libzcash::ProofVerifier& verifier,
const uint256& pubKeyHash
) const {
return params.verify(
proof,
verifier,
pubKeyHash,
randomSeed,
macs,

View File

@@ -95,7 +95,11 @@ public:
);
// Verifies that the JoinSplit proof is correct.
bool Verify(ZCJoinSplit& params, const uint256& pubKeyHash) const;
bool Verify(
ZCJoinSplit& params,
libzcash::ProofVerifier& verifier,
const uint256& pubKeyHash
) const;
// Returns the calculated h_sig
uint256 h_sig(ZCJoinSplit& params, const uint256& pubKeyHash) const;