arnaucube
arnaucube/hyperplonkPublic Self-hosted repository
hyperplonk/poly-iop/src/lib.rs
poly-iop/src/lib.rsRaw
 1use ark_ff::PrimeField;
 2use std::marker::PhantomData;
 3
 4mod errors;
 5mod perm_check;
 6mod structs;
 7mod sum_check;
 8mod transcript;
 9mod utils;
10mod virtual_poly;
11mod zero_check;
12
13pub use errors::PolyIOPErrors;
14pub use perm_check::{
15    util::{identity_permutation_mle, random_permutation_mle},
16    PermutationCheck,
17};
18pub use sum_check::SumCheck;
19pub use transcript::IOPTranscript;
20pub use utils::*;
21pub use virtual_poly::{VPAuxInfo, VirtualPolynomial};
22pub use zero_check::ZeroCheck;
23
24#[derive(Clone, Debug, Default, Copy)]
25/// Struct for PolyIOP protocol.
26/// It has an associated type `F` that defines the prime field the multi-variate
27/// polynomial operates on.
28///
29/// An PolyIOP may be instantiated with one of the following:
30/// - SumCheck protocol.
31/// - ZeroCheck protocol.
32/// - PermutationCheck protocol.
33///
34/// Those individual protocol may have similar or identical APIs.
35/// The systematic way to invoke specific protocol is, for example
36///     `<PolyIOP<F> as SumCheck<F>>::prove()`
37pub struct PolyIOP<F: PrimeField> {
38    /// Associated field
39    #[doc(hidden)]
40    phantom: PhantomData<F>,
41}