Skip to content

Commit

Permalink
create new() methods for VerifirableSecretSharingCommitment and Coeff…
Browse files Browse the repository at this point in the history
…icientCommitment
  • Loading branch information
conradoplg committed Nov 16, 2023
1 parent 99866a7 commit cd4b945
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions frost-core/src/keys.rs
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,12 @@ impl<C> CoefficientCommitment<C>
where
C: Ciphersuite,
{
/// Create a new CoefficientCommitment.
#[cfg_attr(feature = "internals", visibility::make(pub))]
pub(crate) fn new(value: Element<C>) -> Self {
Self(value)
}

/// returns serialized element
pub fn serialize(&self) -> <C::Group as Group>::Serialization {
<C::Group>::serialize(&self.0)
Expand Down Expand Up @@ -371,6 +377,12 @@ impl<C> VerifiableSecretSharingCommitment<C>
where
C: Ciphersuite,
{
/// Create a new VerifiableSecretSharingCommitment.
#[cfg_attr(feature = "internals", visibility::make(pub))]
pub(crate) fn new(coefficients: Vec<CoefficientCommitment<C>>) -> Self {
Self(coefficients)
}

/// Returns serialized coefficent commitments
pub fn serialize(&self) -> Vec<<C::Group as Group>::Serialization> {
self.0
Expand Down

0 comments on commit cd4b945

Please sign in to comment.