diff --git a/src/groth16/mod.rs b/src/groth16/mod.rs index 18039fa..3b8d671 100644 --- a/src/groth16/mod.rs +++ b/src/groth16/mod.rs @@ -26,9 +26,9 @@ pub use self::verifier::*; #[derive(Clone)] pub struct Proof { - a: E::G1Affine, - b: E::G2Affine, - c: E::G1Affine + pub a: E::G1Affine, + pub b: E::G2Affine, + pub c: E::G1Affine } impl PartialEq for Proof { @@ -101,28 +101,28 @@ impl Proof { pub struct VerifyingKey { // alpha in g1 for verifying and for creating A/C elements of // proof. Never the point at infinity. - alpha_g1: E::G1Affine, + pub alpha_g1: E::G1Affine, // beta in g1 and g2 for verifying and for creating B/C elements // of proof. Never the point at infinity. - beta_g1: E::G1Affine, - beta_g2: E::G2Affine, + pub beta_g1: E::G1Affine, + pub beta_g2: E::G2Affine, // gamma in g2 for verifying. Never the point at infinity. - gamma_g2: E::G2Affine, + pub gamma_g2: E::G2Affine, // delta in g1/g2 for verifying and proving, essentially the magic // trapdoor that forces the prover to evaluate the C element of the // proof with only components from the CRS. Never the point at // infinity. - delta_g1: E::G1Affine, - delta_g2: E::G2Affine, + pub delta_g1: E::G1Affine, + pub delta_g2: E::G2Affine, // Elements of the form (beta * u_i(tau) + alpha v_i(tau) + w_i(tau)) / gamma // for all public inputs. Because all public inputs have a dummy constraint, // this is the same size as the number of inputs, and never contains points // at infinity. - ic: Vec + pub ic: Vec } impl PartialEq for VerifyingKey { @@ -218,23 +218,23 @@ pub struct Parameters { // Elements of the form ((tau^i * t(tau)) / delta) for i between 0 and // m-2 inclusive. Never contains points at infinity. - h: Arc>, + pub h: Arc>, // Elements of the form (beta * u_i(tau) + alpha v_i(tau) + w_i(tau)) / delta // for all auxillary inputs. Variables can never be unconstrained, so this // never contains points at infinity. - l: Arc>, + pub l: Arc>, // QAP "A" polynomials evaluated at tau in the Lagrange basis. Never contains // points at infinity: polynomials that evaluate to zero are omitted from // the CRS and the prover can deterministically skip their evaluation. - a: Arc>, + pub a: Arc>, // QAP "B" polynomials evaluated at tau in the Lagrange basis. Needed in // G1 and G2 for C/B queries, respectively. Never contains points at // infinity for the same reason as the "A" polynomials. - b_g1: Arc>, - b_g2: Arc> + pub b_g1: Arc>, + pub b_g2: Arc> } impl PartialEq for Parameters {