pub struct KeyExportReceiver<SK = NoSigningKey, VK = NoVerifyingKey, MS = NoSignature> { /* private fields */ }
Expand description
A message used for setting up key export receiving operations in a multi-party computation protocol.
This struct encapsulates all necessary information for receiving an exported key, including 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 signature
Implementations§
Source§impl<SK, VK, MS> KeyExportReceiver<SK, VK, MS>
impl<SK, VK, MS> KeyExportReceiver<SK, VK, MS>
Sourcepub fn new(
inst: InstanceId,
sk: SK,
party_id: usize,
vk: Vec<VK>,
share: Arc<Keyshare>,
enc_key: ReusableSecret,
) -> Self
pub fn new( inst: InstanceId, sk: SK, party_id: usize, vk: Vec<VK>, share: Arc<Keyshare>, enc_key: ReusableSecret, ) -> Self
Creates a new setup message for key export receiving operations.
§Arguments
inst
- Instance identifier for the protocolsk
- Signing key for the current partyparty_id
- ID of the current partyvk
- Vector of verifying keys for all participantsshare
- Reference to the keyshare to be receivedenc_key
- Private key used for decryption
§Returns
A new KeyExportReceiver
instance with default TTL
Trait Implementations§
Source§impl<SK, VK, MS> KeyExportReceiverSetupMessage<ReusableSecret> for KeyExportReceiver<SK, VK, MS>
impl<SK, VK, MS> KeyExportReceiverSetupMessage<ReusableSecret> for KeyExportReceiver<SK, VK, MS>
Returns a reference to the keyshare to be received.
Source§fn receiver_private_key(&self) -> &ReusableSecret
fn receiver_private_key(&self) -> &ReusableSecret
Returns the private key used for decryption.
Source§impl<SK, VK, MS> ProtocolParticipant for KeyExportReceiver<SK, VK, MS>
impl<SK, VK, MS> ProtocolParticipant for KeyExportReceiver<SK, VK, MS>
Source§fn total_participants(&self) -> usize
fn total_participants(&self) -> usize
Returns the total number of participants in the protocol.
Source§fn participant_index(&self) -> usize
fn participant_index(&self) -> usize
Returns the index of the current participant.
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 verifier(&self, index: usize) -> &Self::MessageVerifier
fn verifier(&self, index: usize) -> &Self::MessageVerifier
Source§fn signer(&self) -> &Self::MessageSigner
fn signer(&self) -> &Self::MessageSigner
Returns the signing key for the current participant.
Source§type MessageSignature = MS
type MessageSignature = MS
Type of a signature, added at end of all broadcast messages
passed between participants.
Source§type MessageSigner = SK
type MessageSigner = SK
Type to sign broadcast messages, some kind of SecretKey.
Source§type MessageVerifier = VK
type MessageVerifier = VK
Type to verify signed message, a verifying key. AsRef<u8> is
used to get external representation of the key to derive
message ID.
Source§fn participant_verifier(&self) -> &Self::MessageVerifier
fn participant_verifier(&self) -> &Self::MessageVerifier
Return reference to participant’s own verifier
Source§fn all_other_parties(&self) -> AllOtherParties ⓘ
fn all_other_parties(&self) -> AllOtherParties ⓘ
Return iterator of all participant’s indexes except own one.
Source§fn msg_id(&self, receiver: Option<usize>, tag: MessageTag) -> MsgId
fn msg_id(&self, receiver: Option<usize>, tag: MessageTag) -> MsgId
Generate ID of a message from this party to some other (or broadcast)
if passed receiver is None.
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
Generate ID of a message from given sender to a given
receiver. Receiver is designed by its index and is None for a
broadcase message.
Auto Trait Implementations§
impl<SK, VK, MS> Freeze for KeyExportReceiver<SK, VK, MS>where
SK: Freeze,
impl<SK, VK, MS> RefUnwindSafe for KeyExportReceiver<SK, VK, MS>
impl<SK, VK, MS> Send for KeyExportReceiver<SK, VK, MS>
impl<SK, VK, MS> Sync for KeyExportReceiver<SK, VK, MS>
impl<SK, VK, MS> Unpin for KeyExportReceiver<SK, VK, MS>
impl<SK, VK, MS> UnwindSafe for KeyExportReceiver<SK, VK, MS>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more