Trait QuorumChangeSetupMessage

Source
pub trait QuorumChangeSetupMessage<KS, PK>: ProtocolParticipant {
    // Required methods
    fn old_keyshare(&self) -> Option<&KS>;
    fn new_threshold(&self) -> u8;
    fn expected_public_key(&self) -> &PK;
    fn old_party_indices(&self) -> &[usize];
    fn new_party_indices(&self) -> &[usize];
    fn derive_key_id(&self, public_key: &[u8]) -> [u8; 32];

    // Provided methods
    fn new_participant_rank(&self, _party_id: u8) -> u8 { ... }
    fn new_party_id(&self, index: usize) -> Option<u8> { ... }
    fn keyshare_extra(&self) -> &[u8]  { ... }
}
Expand description

A setup message for quorum_change::run()

Required Methods§

Source

fn old_keyshare(&self) -> Option<&KS>

A shared reference to a Keyshare.

Source

fn new_threshold(&self) -> u8

New threshold parameter.

Source

fn expected_public_key(&self) -> &PK

Expected public key.

Source

fn old_party_indices(&self) -> &[usize]

list of old party indices

Source

fn new_party_indices(&self) -> &[usize]

List of indices of new parties in a list of protocol participants. Order of indices defines assignment of party-id to new key shares.

Source

fn derive_key_id(&self, public_key: &[u8]) -> [u8; 32]

Derive key_id from a public_key.

Provided Methods§

Source

fn new_participant_rank(&self, _party_id: u8) -> u8

New participant rank. Panics is party_id is out of range.

Source

fn new_party_id(&self, index: usize) -> Option<u8>

return new_party_id by party_index

Source

fn keyshare_extra(&self) -> &[u8]

Additional data to incorpatate into resulting Keyshare.

Implementations on Foreign Types§

Source§

impl<KS, PK, M: QuorumChangeSetupMessage<KS, PK>> QuorumChangeSetupMessage<KS, PK> for &M

Source§

fn old_keyshare(&self) -> Option<&KS>

Source§

fn new_threshold(&self) -> u8

Source§

fn expected_public_key(&self) -> &PK

Source§

fn old_party_indices(&self) -> &[usize]

Source§

fn new_party_indices(&self) -> &[usize]

Source§

fn derive_key_id(&self, public_key: &[u8]) -> [u8; 32]

Implementors§

Source§

impl<SK, VK, MS, KS, PK> QuorumChangeSetupMessage<KS, PK> for SetupMessage<SK, VK, MS, KS, PK>
where SK: Signer<MS>, MS: SignatureEncoding, VK: AsRef<[u8]> + Verifier<MS>,