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

Method decrypt_given_groth16_vk

saver/src/encryption.rs:325–335  ·  view source on GitHub ↗

Same as `Self::decrypt` but takes Groth16's verification key instead of the generators used for Elgamal encryption

(
        c_0: &E::G1Affine,
        c: &[E::G1Affine],
        sk: &SecretKey<E::ScalarField>,
        dk: impl Into<PreparedDecryptionKey<E>>,
        snark_vk: &ark_groth16::VerifyingKey<E>,
      

Source from the content-addressed store, hash-verified

323
324 /// Same as `Self::decrypt` but takes Groth16's verification key instead of the generators used for Elgamal encryption
325 pub fn decrypt_given_groth16_vk(
326 c_0: &E::G1Affine,
327 c: &[E::G1Affine],
328 sk: &SecretKey<E::ScalarField>,
329 dk: impl Into<PreparedDecryptionKey<E>>,
330 snark_vk: &ark_groth16::VerifyingKey<E>,
331 chunk_bit_size: u8,
332 ) -> crate::Result<(E::ScalarField, E::G1Affine)> {
333 let g_i = saver_groth16::get_gs_for_encryption(snark_vk);
334 Self::decrypt(c_0, c, sk, dk, g_i, chunk_bit_size)
335 }
336
337 /// Same as `Self::decrypt` but takes Groth16's verification key and the
338 /// precomputed pairing powers

Callers 4

decrypt_and_verifyFunction · 0.80
checkFunction · 0.80
checkFunction · 0.80

Calls 2

get_gs_for_encryptionFunction · 0.70
decryptMethod · 0.45

Tested by 3

decrypt_and_verifyFunction · 0.64
checkFunction · 0.64