Same as `Self::decrypt` but expects pairing powers (see `PreparedDecryptionKey::pairing_powers`) that can be precomputed for even faster decryption
(
c_0: &E::G1Affine,
c: &[E::G1Affine],
sk: &SecretKey<E::ScalarField>,
dk: impl Into<PreparedDecryptionKey<E>>,
g_i: &[E::G1Affine],
chunk_bit_size: u8
| 301 | /// Same as `Self::decrypt` but expects pairing powers (see `PreparedDecryptionKey::pairing_powers`) |
| 302 | /// that can be precomputed for even faster decryption |
| 303 | pub fn decrypt_given_pairing_powers( |
| 304 | c_0: &E::G1Affine, |
| 305 | c: &[E::G1Affine], |
| 306 | sk: &SecretKey<E::ScalarField>, |
| 307 | dk: impl Into<PreparedDecryptionKey<E>>, |
| 308 | g_i: &[E::G1Affine], |
| 309 | chunk_bit_size: u8, |
| 310 | pairing_powers: &[Vec<PairingOutput<E>>], |
| 311 | ) -> crate::Result<(E::ScalarField, E::G1Affine)> { |
| 312 | let (chunks, nu) = Self::decrypt_to_chunks_given_pairing_powers( |
| 313 | c_0, |
| 314 | c, |
| 315 | sk, |
| 316 | dk, |
| 317 | g_i, |
| 318 | chunk_bit_size, |
| 319 | Some(pairing_powers), |
| 320 | )?; |
| 321 | Ok((utils::compose(&chunks, chunk_bit_size)?, nu)) |
| 322 | } |
| 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( |
no test coverage detected