pub struct VerifiableSecretSharingCommitment<C: Ciphersuite>(/* private fields */);
Expand description
Contains the commitments to the coefficients for our secret polynomial f, used to generate participants’ key shares.
VerifiableSecretSharingCommitment
contains a set of commitments to the coefficients (which
themselves are scalars) for a secret polynomial f, where f is used to
generate each ith participant’s key share f(i). Participants use this set of
commitments to perform verifiable secret sharing.
Note that participants MUST be assured that they have the same
VerifiableSecretSharingCommitment
, either by performing pairwise comparison, or by using
some agreed-upon public location for publication, where each participant can
ensure that they received the correct (and same) value.
Implementations§
Source§impl<C> VerifiableSecretSharingCommitment<C>where
C: Ciphersuite,
impl<C> VerifiableSecretSharingCommitment<C>where
C: Ciphersuite,
Sourcepub fn serialize(&self) -> Result<Vec<Vec<u8>>, Error<C>>
pub fn serialize(&self) -> Result<Vec<Vec<u8>>, Error<C>>
Returns serialized coefficient commitments
Sourcepub fn serialize_whole(&self) -> Result<Vec<u8>, Error<C>>
pub fn serialize_whole(&self) -> Result<Vec<u8>, Error<C>>
Serialize the whole commitment vector as a single byte vector.
Sourcepub fn deserialize<I, V>(
serialized_coefficient_commitments: I,
) -> Result<Self, Error<C>>
pub fn deserialize<I, V>( serialized_coefficient_commitments: I, ) -> Result<Self, Error<C>>
Returns VerifiableSecretSharingCommitment from an iterator of serialized
CoefficientCommitments (e.g. a Vec<Vec<u8>>
).
Sourcepub fn deserialize_whole(bytes: &[u8]) -> Result<Self, Error<C>>
pub fn deserialize_whole(bytes: &[u8]) -> Result<Self, Error<C>>
Deserialize a whole commitment vector from a single byte vector as returned by
VerifiableSecretSharingCommitment::serialize_whole()
.
Trait Implementations§
Source§impl<C: Clone + Ciphersuite> Clone for VerifiableSecretSharingCommitment<C>
impl<C: Clone + Ciphersuite> Clone for VerifiableSecretSharingCommitment<C>
Source§fn clone(&self) -> VerifiableSecretSharingCommitment<C>
fn clone(&self) -> VerifiableSecretSharingCommitment<C>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl<C: Debug + Ciphersuite> Debug for VerifiableSecretSharingCommitment<C>
impl<C: Debug + Ciphersuite> Debug for VerifiableSecretSharingCommitment<C>
Source§impl<'de, C> Deserialize<'de> for VerifiableSecretSharingCommitment<C>where
C: Ciphersuite,
impl<'de, C> Deserialize<'de> for VerifiableSecretSharingCommitment<C>where
C: Ciphersuite,
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl<C: PartialEq + Ciphersuite> PartialEq for VerifiableSecretSharingCommitment<C>
impl<C: PartialEq + Ciphersuite> PartialEq for VerifiableSecretSharingCommitment<C>
Source§fn eq(&self, other: &VerifiableSecretSharingCommitment<C>) -> bool
fn eq(&self, other: &VerifiableSecretSharingCommitment<C>) -> bool
self
and other
values to be equal, and is used by ==
.