pub struct CommitmentList { /* private fields */ }Expand description
A Feldman-style commitment list to a VSS polynomial: C_k = a_k · B
for each coefficient a_k. Reveal nothing about the secret beyond what
the public key already does (since C_0 = A, the public key), but let
recipients verify that a share f(i) is consistent with the
committed polynomial via f(i)·B == Σ_k i^k · C_k.
Implementations§
Source§impl CommitmentList
impl CommitmentList
Sourcepub fn from_bytes(commits: Vec<[u8; 32]>) -> Self
pub fn from_bytes(commits: Vec<[u8; 32]>) -> Self
Build from already-encoded commitment bytes.
Sourcepub fn commit(poly: &Polynomial) -> Self
pub fn commit(poly: &Polynomial) -> Self
Build by committing each coefficient of poly to the base point.
Sourcepub fn public_key_bytes(&self) -> [u8; 32]
pub fn public_key_bytes(&self) -> [u8; 32]
The aggregate public key A = C_0 = a_0 · B as compressed bytes.
Verify a share s_i claimed to be f(i) for the polynomial this
list commits to. Returns true iff s_i · B == Σ_k i^k · C_k.
Trait Implementations§
Source§impl Clone for CommitmentList
impl Clone for CommitmentList
Source§fn clone(&self) -> CommitmentList
fn clone(&self) -> CommitmentList
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 moreSource§impl Debug for CommitmentList
impl Debug for CommitmentList
impl Eq for CommitmentList
Source§impl PartialEq for CommitmentList
impl PartialEq for CommitmentList
Source§fn eq(&self, other: &CommitmentList) -> bool
fn eq(&self, other: &CommitmentList) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for CommitmentList
Auto Trait Implementations§
impl Freeze for CommitmentList
impl RefUnwindSafe for CommitmentList
impl Send for CommitmentList
impl Sync for CommitmentList
impl Unpin for CommitmentList
impl UnsafeUnpin for CommitmentList
impl UnwindSafe for CommitmentList
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