MCPcopy Create free account
hub / github.com/arkworks-rs/poly-commit / PCCommitmentState

Interface PCCommitmentState

poly-commit/src/data_structures.rs:77–95  ·  view source on GitHub ↗

Defines the minimal interface of commitment state for any polynomial commitment scheme. It might be randomness etc.

Source from the content-addressed store, hash-verified

75/// Defines the minimal interface of commitment state for any polynomial
76/// commitment scheme. It might be randomness etc.
77pub trait PCCommitmentState: Clone + CanonicalSerialize + CanonicalDeserialize {
78 /// This is the type of `Randomness` that the `rand` method returns
79 type Randomness: Clone + CanonicalSerialize + CanonicalDeserialize;
80
81 /// Outputs empty randomness that does not hide the commitment.
82 fn empty() -> Self;
83
84 /// Samples randomness for commitments;
85 /// `num_queries` specifies the number of queries that the commitment will be opened at.
86 /// `has_degree_bound` indicates that the corresponding commitment has an enforced
87 /// `num_vars` specifies the number of variables for multivariate commitment.
88 /// strict degree bound.
89 fn rand<R: RngCore>(
90 num_queries: usize,
91 has_degree_bound: bool,
92 num_vars: Option<usize>,
93 rng: &mut R,
94 ) -> Self::Randomness;
95}
96/// A proof of satisfaction of linear combinations.
97#[derive(Clone, CanonicalSerialize, CanonicalDeserialize)]
98pub struct BatchLCProof<F: PrimeField, T: Clone + CanonicalSerialize + CanonicalDeserialize> {

Callers

nothing calls this directly

Implementers 6

data_structures.rspoly-commit/src/marlin/marlin_pst13_pc
data_structures.rspoly-commit/src/marlin/marlin_pc/data_
data_structures.rspoly-commit/src/linear_codes/data_stru
data_structures.rspoly-commit/src/ipa_pc/data_structures
data_structures.rspoly-commit/src/kzg10/data_structures.
data_structures.rspoly-commit/src/hyrax/data_structures.

Calls

no outgoing calls

Tested by

no test coverage detected