/// Verify a Groth16 proof `proof` against the prepared verification key `pvk` and prepared public
/// inputs. This should be preferred over [`verify_proof`] if the instance's public inputs are
/// known in advance.
Verify a Groth16 proof `proof` against the prepared verification key `pvk` and prepared public
inputs. This should be preferred over [`verify_proof`] if the instance's public inputs are
known in advance.
Verify a Groth16 proof ` proof ` against the prepared verification key ` pvk ` and prepared public inputs . This should be preferred over [ ` verify_proof ` ] if the instance ' s public inputs are known in advance .
pub fn verify_proof_with_prepared_inputs<E: PairingEngine>(
    pvk: &PreparedVerifyingKey<E>,
    proof: &Proof<E>,
    prepared_inputs: &E::G1Projective,
) -> R1CSResult<bool> {
    let qap = E::miller_loop(
        [
            (proof.a.into(), proof.b.into()),
            (
                prepared_inputs.into_affine().into(),
                pvk.gamma_g2_neg_pc.clone(),
            ),
            (proof.c.into(), pvk.delta_g2_neg_pc.clone()),
        ]
        .iter(),
    );
    let test = E::final_exponentiation(&qap).ok_or(SynthesisError::UnexpectedIdentity)?;
    Ok(test == pvk.alpha_g1_beta_g2)
}
pub fn verify_proof_with_prepared_inputs < E : PairingEngine > ( pvk : & PreparedVerifyingKey < E > , proof : & Proof < E > , prepared_inputs : & E :: G1Projective , ) -> R1CSResult < bool > { let qap = E :: miller_loop ( [ ( proof . a . into ( ) , proof . b . into ( ) ) , ( prepared_inputs . into_affine ( ) . into ( ) , pvk . gamma_g2_neg_pc . clone ( ) , ) , ( proof . c . into ( ) , pvk . delta_g2_neg_pc . clone ( ) ) , ] . iter ( ) , ) ; let test = E :: final_exponentiation ( & qap ) . ok_or ( SynthesisError :: UnexpectedIdentity ) ? ; Ok ( test == pvk . alpha_g1_beta_g2 ) }
Verify a Groth16 proof `proof` against the prepared verification key `pvk` and prepared public
inputs.
Verify a Groth16 proof ` proof ` against the prepared verification key ` pvk ` and prepared public inputs .
pvk
&PreparedVerifyingKey<E>
proof
&Proof<E>
prepared_inputs
&E::G1Projective