proof_of_sql/proof_primitive/dory/
mod.rs1#![expect(non_snake_case)]
19
20use ark_bls12_381::{Fr as F, G1Affine, G1Projective, G2Affine, G2Projective};
21type GT = ark_ec::pairing::PairingOutput<ark_bls12_381::Bls12_381>;
23
24#[cfg(any(test, feature = "test"))]
25mod rand_util;
26#[cfg(test)]
27use rand_util::rand_F_tensors;
28#[cfg(test)]
29use rand_util::rand_G_vecs;
30#[cfg(test)]
31pub use rand_util::test_rng;
32
33mod dory_messages;
34pub(crate) use dory_messages::DoryMessages;
35#[cfg(test)]
36mod dory_messages_test;
37
38mod setup;
39pub use setup::{ProverSetup, VerifierSetup};
40#[cfg(test)]
41mod setup_test;
42
43mod state;
44pub(crate) use state::{ProverState, VerifierState};
45#[cfg(test)]
46mod state_test;
47
48#[cfg(test)]
49mod dory_reduce;
50mod dory_reduce_helper;
51mod scalar_product;
52
53#[cfg(test)]
54use dory_reduce::{dory_reduce_prove, dory_reduce_verify};
55use scalar_product::{scalar_product_prove, scalar_product_verify};
56
57#[cfg(test)]
58mod dory_inner_product;
59#[cfg(test)]
60pub(crate) use dory_inner_product::{dory_inner_product_prove, dory_inner_product_verify};
61
62#[cfg(test)]
63mod dory_inner_product_test;
64
65mod extended_state;
66pub(crate) use extended_state::{ExtendedProverState, ExtendedVerifierState};
67#[cfg(test)]
68mod extended_state_test;
69
70mod extended_dory_reduce;
71mod extended_dory_reduce_helper;
72mod fold_scalars;
73
74pub(crate) use extended_dory_reduce::{extended_dory_reduce_prove, extended_dory_reduce_verify};
75pub(crate) use fold_scalars::{fold_scalars_0_prove, fold_scalars_0_verify};
76
77#[cfg(test)]
78mod fold_scalars_test;
79
80mod extended_dory_inner_product;
81pub(crate) use extended_dory_inner_product::{
82 extended_dory_inner_product_prove, extended_dory_inner_product_verify,
83};
84
85#[cfg(test)]
86mod extended_dory_inner_product_test;
87
88mod public_parameters;
89pub use public_parameters::PublicParameters;
90
91mod eval_vmv_re;
92pub(crate) use eval_vmv_re::{eval_vmv_re_prove, eval_vmv_re_verify};
93
94#[cfg(test)]
95mod eval_vmv_re_test;
96
97mod vmv_state;
98#[cfg(test)]
99use vmv_state::VMV;
100pub(crate) use vmv_state::{VMVProverState, VMVVerifierState};
101
102#[cfg(test)]
103mod vmv_state_test;
104
105mod dory_public_setup;
106pub use dory_public_setup::{DoryProverPublicSetup, DoryVerifierPublicSetup};
107
108mod dory_commitment;
109#[cfg(test)]
110mod dory_commitment_test;
111
112#[cfg(not(feature = "blitzar"))]
113mod dory_commitment_helper_cpu;
114#[cfg(not(feature = "blitzar"))]
115use dory_commitment_helper_cpu::compute_dory_commitments;
116#[cfg(feature = "blitzar")]
117mod dory_commitment_helper_gpu;
118pub use dory_commitment::{DoryCommitment, DoryScalar};
119#[cfg(feature = "blitzar")]
120use dory_commitment_helper_gpu::compute_dory_commitments;
121#[cfg(test)]
122mod dory_compute_commitments_test;
123
124mod dory_vmv_helper;
125use dory_vmv_helper::{
126 compute_L_R_vec, compute_T_vec_prime, compute_l_r_tensors, compute_nu, compute_v_vec,
127};
128mod build_vmv_state;
129use build_vmv_state::{build_vmv_prover_state, build_vmv_verifier_state};
130
131mod dory_commitment_evaluation_proof;
132pub use dory_commitment_evaluation_proof::DoryEvaluationProof;
133#[cfg(test)]
134mod dory_commitment_evaluation_proof_test;
135
136mod deferred_msm;
137type DeferredGT = deferred_msm::DeferredMSM<GT, F>;
138type DeferredG1 = deferred_msm::DeferredMSM<G1Affine, F>;
139type DeferredG2 = deferred_msm::DeferredMSM<G2Affine, F>;
140
141mod blitzar_metadata_table;
142mod offset_to_bytes;
143mod pack_scalars;
144mod pairings;
145mod transpose;
146
147mod dynamic_build_vmv_state;
148#[cfg(not(feature = "blitzar"))]
149mod dynamic_dory_commitment_helper_cpu;
150#[cfg(feature = "blitzar")]
151mod dynamic_dory_commitment_helper_gpu;
152mod dynamic_dory_helper;
153#[cfg(not(feature = "blitzar"))]
154use dynamic_dory_commitment_helper_cpu::compute_dynamic_dory_commitments;
155#[cfg(feature = "blitzar")]
156use dynamic_dory_commitment_helper_gpu::compute_dynamic_dory_commitments;
157mod dynamic_dory_commitment;
158mod dynamic_dory_commitment_evaluation_proof;
159#[cfg(test)]
160mod dynamic_dory_compute_commitments_test;
161pub use dynamic_dory_commitment::DynamicDoryCommitment;
162#[cfg(test)]
163mod dynamic_dory_commitment_evaluation_proof_test;
164pub use dynamic_dory_commitment_evaluation_proof::DynamicDoryEvaluationProof;