pub struct SetupMessage<SK = NoSigningKey, VK = NoVerifyingKey, MS = NoSignature, KS = Keyshare, PK = ProjectivePoint> { /* private fields */ }
Expand description
A message used for setting up quorum changes in a multi-party computation protocol.
This struct encapsulates all necessary information for changing the quorum of participants, including old and new participant information, cryptographic keys, and protocol parameters.
§Type Parameters
SK
- The type of signing key used for message signaturesVK
- The type of verifying key used to verify message signaturesMS
- The type of message signatureKS
- The type of keyshare used in the protocolPK
- The type of public key used in the protocol
Implementations§
Source§impl<SK, VK, MS, KS, PK> SetupMessage<SK, VK, MS, KS, PK>
impl<SK, VK, MS, KS, PK> SetupMessage<SK, VK, MS, KS, PK>
Sourcepub fn new(
instance: InstanceId,
this_party: usize,
old_parties: &[usize],
new_parties: &[(usize, u8)],
new_t: usize,
sk: SK,
vk: Vec<VK>,
public_key: PK,
) -> Self
pub fn new( instance: InstanceId, this_party: usize, old_parties: &[usize], new_parties: &[(usize, u8)], new_t: usize, sk: SK, vk: Vec<VK>, public_key: PK, ) -> Self
Creates a new setup message for quorum changes.
§Arguments
instance
- Instance identifier for the protocolthis_party
- ID of the current partyold_parties
- Indices of old participantsnew_parties
- Pairs of (index, rank) for new participantsnew_t
- New threshold valuesk
- Signing key for the current partyvk
- Vector of verifying keys for all participantspublic_key
- Public key for the protocol
§Panics
Panics if:
this_party
is not less than the total number of parties- Any old party index is not less than the total number of parties
- Any new party index is not less than the total number of parties
new_t
is greater than the number of new parties
Trait Implementations§
Source§impl<SK, VK, MS, KS, PK> ProtocolParticipant for SetupMessage<SK, VK, MS, KS, PK>
impl<SK, VK, MS, KS, PK> ProtocolParticipant for SetupMessage<SK, VK, MS, KS, PK>
Source§fn signer(&self) -> &Self::MessageSigner
fn signer(&self) -> &Self::MessageSigner
Returns the signing key for the current participant.
Source§fn verifier(&self, index: usize) -> &Self::MessageVerifier
fn verifier(&self, index: usize) -> &Self::MessageVerifier
Source§fn instance_id(&self) -> &InstanceId
fn instance_id(&self) -> &InstanceId
Returns the instance identifier for the protocol.
Source§fn message_ttl(&self) -> Duration
fn message_ttl(&self) -> Duration
Returns the time-to-live duration for messages.
Source§fn participant_index(&self) -> usize
fn participant_index(&self) -> usize
Returns the index of the current participant.
Source§fn total_participants(&self) -> usize
fn total_participants(&self) -> usize
Returns the total number of participants in the protocol.
Source§type MessageSignature = MS
type MessageSignature = MS
Source§type MessageSigner = SK
type MessageSigner = SK
Source§type MessageVerifier = VK
type MessageVerifier = VK
Source§fn participant_verifier(&self) -> &Self::MessageVerifier
fn participant_verifier(&self) -> &Self::MessageVerifier
Source§fn all_other_parties(&self) -> AllOtherParties ⓘ
fn all_other_parties(&self) -> AllOtherParties ⓘ
Source§fn msg_id(&self, receiver: Option<usize>, tag: MessageTag) -> MsgId
fn msg_id(&self, receiver: Option<usize>, tag: MessageTag) -> MsgId
Source§fn msg_id_from(
&self,
sender: usize,
receiver: Option<usize>,
tag: MessageTag,
) -> MsgId
fn msg_id_from( &self, sender: usize, receiver: Option<usize>, tag: MessageTag, ) -> MsgId
Source§impl<SK, VK, MS, KS, PK> QuorumChangeSetupMessage<KS, PK> for SetupMessage<SK, VK, MS, KS, PK>
impl<SK, VK, MS, KS, PK> QuorumChangeSetupMessage<KS, PK> for SetupMessage<SK, VK, MS, KS, PK>
Returns a reference to the old keyshare if it exists.
Source§fn new_threshold(&self) -> u8
fn new_threshold(&self) -> u8
Returns the new threshold value for the protocol.
Source§fn new_participant_rank(&self, party_id: u8) -> u8
fn new_participant_rank(&self, party_id: u8) -> u8
Source§fn expected_public_key(&self) -> &PK
fn expected_public_key(&self) -> &PK
Returns the expected public key for the protocol.
Source§fn old_party_indices(&self) -> &[usize]
fn old_party_indices(&self) -> &[usize]
Returns the indices of the old participants.
Source§fn new_party_indices(&self) -> &[usize]
fn new_party_indices(&self) -> &[usize]
Returns the indices of the new participants.