Trait KeygenSetupMessage

Source
pub trait KeygenSetupMessage: ProtocolParticipant {
    // Required methods
    fn threshold(&self) -> u8;
    fn derive_key_id(&self, public_key: &[u8]) -> [u8; 32];

    // Provided methods
    fn participant_rank(&self, _party_index: usize) -> u8 { ... }
    fn keyshare_extra(&self) -> &[u8]  { ... }
}
Expand description

A setup message for keygen::run()

Required Methods§

Source

fn threshold(&self) -> u8

Threshold parameter.

Source

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

Derive key_id from a public_key.

Provided Methods§

Source

fn participant_rank(&self, _party_index: usize) -> u8

Return a rank of a participant with given index. May panic is index is out of range.

Source

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

Additional data to amend into the Keyshare.

Implementations on Foreign Types§

Source§

impl<M: KeygenSetupMessage> KeygenSetupMessage for &M

Source§

fn threshold(&self) -> u8

Source§

fn participant_rank(&self, party_index: usize) -> u8

Source§

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

Source§

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

Implementors§

Source§

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