MCPcopy Create free account
hub / github.com/docknetwork/crypto / verify_commitment_and_proof

Method verify_commitment_and_proof

saver/src/encryption.rs:760–769  ·  view source on GitHub ↗

Verify ciphertext commitment and snark proof

(
        &self,
        proof: &ark_groth16::Proof<E>,
        snark_vk: &ark_groth16::PreparedVerifyingKey<E>,
        ek: impl Into<PreparedEncryptionKey<E>>,
        gens: impl Into<PreparedEncryp

Source from the content-addressed store, hash-verified

758
759 /// Verify ciphertext commitment and snark proof
760 pub fn verify_commitment_and_proof(
761 &self,
762 proof: &ark_groth16::Proof<E>,
763 snark_vk: &ark_groth16::PreparedVerifyingKey<E>,
764 ek: impl Into<PreparedEncryptionKey<E>>,
765 gens: impl Into<PreparedEncryptionGens<E>>,
766 ) -> crate::Result<()> {
767 self.verify_commitment(ek, gens)?;
768 saver_groth16::verify_proof(snark_vk, proof, self)
769 }
770
771 pub fn decrypt_given_groth16_vk(
772 &self,

Callers 2

checkFunction · 0.80

Calls 1

verify_proofFunction · 0.70

Tested by 1

checkFunction · 0.64