27 #ifndef CRYPTO3_ZK_SNARK_ALGORITHMS_VERIFY_HPP
28 #define CRYPTO3_ZK_SNARK_ALGORITHMS_VERIFY_HPP
34 template<
typename ProofSystemType>
35 bool verify(
const typename ProofSystemType::verification_key_type &vk,
36 const typename ProofSystemType::primary_input_type &primary_input,
37 const typename ProofSystemType::proof_type &
proof) {
39 return ProofSystemType::verify(vk, primary_input,
proof);
42 template<
typename ProofSystemType>
43 bool verify(
const typename ProofSystemType::processed_verification_key_type &pvk,
44 const typename ProofSystemType::primary_input_type &primary_input,
45 const typename ProofSystemType::proof_type &
proof) {
47 return ProofSystemType::verify(pvk, primary_input,
proof);
50 template<
typename ProofSystemType,
typename DistributionType,
typename GeneratorType,
typename Hash,
51 typename InputPrimaryInputRange,
typename InputIterator>
52 bool verify(
const typename ProofSystemType::verification_srs_type &ip_verifier_srs,
53 const typename ProofSystemType::verification_key_type &pvk,
54 const InputPrimaryInputRange &public_inputs,
55 const typename ProofSystemType::proof_type &
proof,
56 InputIterator transcript_include_first,
57 InputIterator transcript_include_last) {
59 return ProofSystemType::template verify<DistributionType, GeneratorType, Hash>(
60 ip_verifier_srs, pvk, public_inputs,
proof, transcript_include_first, transcript_include_last);
63 template<
typename ProofSystemType,
typename CipherTextIterator,
typename PublicKey>
64 static inline bool verify(CipherTextIterator first, CipherTextIterator last,
65 const typename ProofSystemType::verification_key_type &vk,
67 const typename ProofSystemType::primary_input_type &unencrypted_primary_input,
68 const typename ProofSystemType::proof_type &
proof) {
69 return ProofSystemType::verify(first, last, vk,
pubkey, unencrypted_primary_input,
proof);
Definition: snark/proof.hpp:37
bool verify(const typename ProofSystemType::verification_key_type &vk, const typename ProofSystemType::primary_input_type &primary_input, const typename ProofSystemType::proof_type &proof)
Definition: zk/include/nil/crypto3/zk/snark/algorithms/verify.hpp:35