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>,
| 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 |