Skip to content

Commit

Permalink
DKG: return pub visibility
Browse files Browse the repository at this point in the history
  • Loading branch information
benr-ml authored Mar 21, 2024
1 parent f658d44 commit 156b4ae
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions fastcrypto-tbls/src/dkg.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@ pub struct Party<G: GroupElement, EG: GroupElement> {
pub struct Message<G: GroupElement, EG: GroupElement> {
pub sender: PartyId,
/// The commitment of the secret polynomial created by the sender.
pub(crate) vss_pk: PublicPoly<G>,
pub vss_pk: PublicPoly<G>,
/// The encrypted shares created by the sender. Sorted according to the receivers.
pub(crate) encrypted_shares: MultiRecipientEncryption<EG>,
pub encrypted_shares: MultiRecipientEncryption<EG>,
}

/// A complaint/fraud claim against a dealer that created invalid encrypted share.
Expand All @@ -66,21 +66,21 @@ pub struct Complaint<EG: GroupElement> {
pub struct Confirmation<EG: GroupElement> {
pub sender: PartyId,
/// List of complaints against other parties. Empty if there are none.
pub(crate) complaints: Vec<Complaint<EG>>,
pub complaints: Vec<Complaint<EG>>,
}

/// Wrapper for collecting everything related to a processed message.
#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize)]
pub struct ProcessedMessage<G: GroupElement, EG: GroupElement> {
pub(crate) message: Message<G, EG>,
pub(crate) shares: Vec<Share<G::ScalarType>>, //possibly empty
pub(crate) complaint: Option<Complaint<EG>>,
pub message: Message<G, EG>,
pub shares: Vec<Share<G::ScalarType>>, //possibly empty
pub complaint: Option<Complaint<EG>>,
}

/// Unique processed messages that are being used in the protocol.
#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize)]
pub struct UsedProcessedMessages<G: GroupElement, EG: GroupElement>(
pub(crate) Vec<ProcessedMessage<G, EG>>,
pub Vec<ProcessedMessage<G, EG>>,
);

impl<G: GroupElement, EG: GroupElement> From<&[ProcessedMessage<G, EG>]>
Expand Down

0 comments on commit 156b4ae

Please sign in to comment.