#include <multisig_account.h>
|
| | multisig_account ()=default |
| | multisig_account (const crypto::secret_key &base_privkey, const crypto::secret_key &base_common_privkey) |
| | multisig_account (const std::uint32_t threshold, std::vector< crypto::public_key > signers, const crypto::secret_key &base_privkey, const crypto::secret_key &base_common_privkey, std::vector< crypto::secret_key > multisig_privkeys, const crypto::secret_key &common_privkey, const crypto::public_key &multisig_pubkey, const crypto::public_key &common_pubkey, const std::uint32_t kex_rounds_complete, multisig_keyset_map_memsafe_t kex_origins_map, std::string next_round_kex_message) |
| | ~multisig_account ()=default |
| std::uint32_t | get_threshold () const |
| const std::vector< crypto::public_key > & | get_signers () const |
| const crypto::secret_key & | get_base_privkey () const |
| const crypto::public_key & | get_base_pubkey () const |
| const crypto::secret_key & | get_base_common_privkey () const |
| const std::vector< crypto::secret_key > & | get_multisig_privkeys () const |
| const crypto::secret_key & | get_common_privkey () const |
| const crypto::public_key & | get_multisig_pubkey () const |
| const crypto::public_key & | get_common_pubkey () const |
| std::uint32_t | get_kex_rounds_complete () const |
| const multisig_keyset_map_memsafe_t & | get_kex_keys_to_origins_map () const |
| const std::string & | get_next_kex_round_msg () const |
| bool | account_is_active () const |
| bool | main_kex_rounds_done () const |
| bool | multisig_is_ready () const |
| void | initialize_kex (const std::uint32_t threshold, std::vector< crypto::public_key > signers, const std::vector< multisig_kex_msg > &expanded_msgs_rnd1) |
| void | kex_update (const std::vector< multisig_kex_msg > &expanded_msgs, const bool force_update_use_with_caution=false) |
◆ multisig_account() [1/3]
| multisig::multisig_account::multisig_account |
( |
| ) |
|
|
default |
◆ multisig_account() [2/3]
construct from base privkeys
- prepares a kex msg for the first round of multisig key construction.
- the local account's kex msgs are signed with the base_privkey
- the first kex msg transmits the local base_common_privkey to other participants, for creating the group's common_privkey
◆ multisig_account() [3/3]
| multisig::multisig_account::multisig_account |
( |
const std::uint32_t | threshold, |
|
|
std::vector< crypto::public_key > | signers, |
|
|
const crypto::secret_key & | base_privkey, |
|
|
const crypto::secret_key & | base_common_privkey, |
|
|
std::vector< crypto::secret_key > | multisig_privkeys, |
|
|
const crypto::secret_key & | common_privkey, |
|
|
const crypto::public_key & | multisig_pubkey, |
|
|
const crypto::public_key & | common_pubkey, |
|
|
const std::uint32_t | kex_rounds_complete, |
|
|
multisig_keyset_map_memsafe_t | kex_origins_map, |
|
|
std::string | next_round_kex_message ) |
◆ ~multisig_account()
| multisig::multisig_account::~multisig_account |
( |
| ) |
|
|
default |
◆ account_is_active()
| bool multisig::multisig_account::account_is_active |
( |
| ) |
const |
◆ finalize_kex_update()
brief: finalize_kex_update - Helper for kex_update_impl() param: kex_rounds_required - number of rounds required for kex (not including post-kex verification round) param: result_keys_to_origins_map - map between keys for the next round and the other participants they correspond to inoutparam: temp_account_inout - account to perform last update steps on
◆ get_base_common_privkey()
◆ get_base_privkey()
◆ get_base_pubkey()
◆ get_common_privkey()
◆ get_common_pubkey()
◆ get_kex_keys_to_origins_map()
◆ get_kex_rounds_complete()
| std::uint32_t multisig::multisig_account::get_kex_rounds_complete |
( |
| ) |
const |
|
inline |
◆ get_multisig_privkeys()
◆ get_multisig_pubkey()
◆ get_next_kex_round_msg()
| const std::string & multisig::multisig_account::get_next_kex_round_msg |
( |
| ) |
const |
|
inline |
◆ get_signers()
◆ get_threshold()
| std::uint32_t multisig::multisig_account::get_threshold |
( |
| ) |
const |
|
inline |
◆ initialize_kex()
brief: initialize_kex - initialize key exchange
- Updates the account with a 'transactional' model. This account will only be mutated if the update succeeds.
◆ initialize_kex_update()
brief: initialize_kex_update - Helper for kex_update_impl()
- Collect the local signer's shared keys to ignore in incoming messages, build the aggregate ancillary key if appropriate. param: expanded_msgs - set of multisig kex messages to process param: kex_rounds_required - number of rounds required for kex (not including post-kex verification round) outparam: exclude_pubkeys_out - keys held by the local account corresponding to round 'current_round'
- If 'current_round' is the final round, these are the local account's shares of the final aggregate key.
◆ kex_update()
brief: kex_update - Complete the 'in progress' kex round and set the kex message for the next round.
- Updates the account with a 'transactional' model. This account will only be mutated if the update succeeds.
- The main interface for multisig key exchange, this handles all the work of processing input messages, creating new messages for new rounds, and finalizing the multisig shared public key when kex is complete. param: expanded_msgs - kex messages corresponding to the account's 'in progress' round param: force_update_use_with_caution - try to force the account to update with messages from an incomplete signer set.
- If this is the post-kex verification round, only require one input message.
- Force updating here should only be done if we can safely assume an honest signer subgroup of size 'threshold' will complete the account.
- If this is an intermediate round, only require messages from 'num signers - 1 - (round - 1)' other signers.
- If force updating with maliciously-crafted messages, the resulting account will be invalid (either unable to complete signatures, or a 'hostage' to the malicious signer [i.e. can't sign without his participation]).
◆ kex_update_impl()
| void multisig::multisig_account::kex_update_impl |
( |
const std::vector< multisig_kex_msg > & | expanded_msgs, |
|
|
const bool | incomplete_signer_set ) |
|
private |
◆ main_kex_rounds_done()
| bool multisig::multisig_account::main_kex_rounds_done |
( |
| ) |
const |
◆ multisig_is_ready()
| bool multisig::multisig_account::multisig_is_ready |
( |
| ) |
const |
◆ set_multisig_config()
| void multisig::multisig_account::set_multisig_config |
( |
const std::size_t | threshold, |
|
|
std::vector< crypto::public_key > | signers ) |
|
private |
◆ m_base_common_privkey
◆ m_base_privkey
local participant's personal keys
◆ m_base_pubkey
◆ m_common_privkey
◆ m_common_pubkey
◆ m_kex_keys_to_origins_map
◆ m_kex_rounds_complete
| std::uint32_t multisig::multisig_account::m_kex_rounds_complete {0} |
|
private |
◆ m_multisig_privkeys
core multisig account keys
◆ m_multisig_pubkey
◆ m_next_round_kex_message
| std::string multisig::multisig_account::m_next_round_kex_message |
|
private |
◆ m_signers
◆ m_threshold
| std::uint32_t multisig::multisig_account::m_threshold {0} |
|
private |
The documentation for this class was generated from the following files: