1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
// Copyright (c) Silence Laboratories Pte. Ltd. All Rights Reserved.
// This software is licensed under the Silence Laboratories License Agreement.
//! This module implements a distributed key generation protocol that allows multiple parties
//! to collaboratively generate a shared secret key without any single party learning the
//! complete secret. The protocol includes several sub-protocols for key refresh, quorum
//! changes, and migration from other protocols.
//!
//! # Submodules
//! * `dkg` - Core distributed key generation protocol
//! * `types` - Common types used across the protocol
//! * `utils` - Utility functions and helpers
//! * `key_refresh` - Protocol for refreshing existing keys
//! * `keyshare` - Key share management and related definitions
//! * `constants` - Protocol constants and configuration
//! * `migration` - Migration utilities to DKLS23 protocol
//! * `quorum_change` - Protocol for changing the quorum of participants
/// Misc reusable code
pub use *;
pub use *;
pub use Keyshare;
use MsgId;
use crate;
/// Generates a map of message receivers for the DKG protocol.
///
/// This function iterates through all other parties in the protocol and calls the provided
/// closure for each message ID and corresponding verifier key. It handles all message types
/// used in the DKG protocol, including abort messages and messages for each round.
///
/// # Arguments
/// * `setup` - The protocol participant setup containing party information
/// * `msg_receiver` - A closure that will be called for each (message_id, verifier) pair
///
/// # Message Types
/// The function handles the following message types:
/// * `ABORT_MESSAGE_TAG` - Protocol abort messages
/// * `DKG_MSG_R1` - Round 1 messages
/// * `DKG_MSG_R2` - Round 2 messages
/// * `DKG_MSG_OT1` - Oblivious transfer messages
/// * `DKG_MSG_R3` - Round 3 messages
/// * `DKG_MSG_R4` - Round 4 messages