pub struct PolynomialCommitment {
pub hash: [u8; 32],
}Expand description
A Blake3-based polynomial commitment.
Fields§
§hash: [u8; 32]The commitment hash (32 bytes).
Implementations§
Source§impl PolynomialCommitment
impl PolynomialCommitment
Sourcepub fn commit(poly: &Polynomial) -> Self
pub fn commit(poly: &Polynomial) -> Self
Commit to a polynomial by hashing its coefficients.
Sourcepub fn create_eval_proof(&self, x: u64, y: u64) -> EvalProof
pub fn create_eval_proof(&self, x: u64, y: u64) -> EvalProof
Create an evaluation proof: hash of (commitment, x, y).
Sourcepub fn verify_eval(&self, proof: &EvalProof, poly: &Polynomial) -> bool
pub fn verify_eval(&self, proof: &EvalProof, poly: &Polynomial) -> bool
Verify an evaluation proof.
Trait Implementations§
Source§impl Clone for PolynomialCommitment
impl Clone for PolynomialCommitment
Source§fn clone(&self) -> PolynomialCommitment
fn clone(&self) -> PolynomialCommitment
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for PolynomialCommitment
impl RefUnwindSafe for PolynomialCommitment
impl Send for PolynomialCommitment
impl Sync for PolynomialCommitment
impl Unpin for PolynomialCommitment
impl UnsafeUnpin for PolynomialCommitment
impl UnwindSafe for PolynomialCommitment
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more