|
Monero
|
Namespaces | |
| namespace | signing |
Classes | |
| class | multisig_account |
| class | multisig_kex_msg |
| struct | multisig_kex_msg_serializable_round1 |
| round 1 kex message More... | |
| struct | multisig_kex_msg_serializable_general |
| general kex message (if round > 1) More... | |
| class | MultisigTest |
| class | Guard |
Typedefs | |
| using | multisig_keyset_map_memsafe_t |
Functions | |
| crypto::secret_key | get_multisig_blinded_secret_key (const crypto::secret_key &key) |
| get_multisig_blinded_secret_key - converts an input private key into a blinded multisig private key Use 1a: converts account private spend key into multisig private key, which is used for key exchange and message signing Use 1b: converts account private view key into ancillary private key share, for the composite multisig private view key Use 2: converts DH shared secrets (curve points) into private keys, which are intermediate private keys in multisig key exchange | |
| bool | generate_multisig_key_image (const cryptonote::account_keys &keys, std::size_t multisig_key_index, const crypto::public_key &out_key, crypto::key_image &ki) |
| void | generate_multisig_LR (const crypto::public_key pkey, const crypto::secret_key &k, crypto::public_key &L, crypto::public_key &R) |
| bool | generate_multisig_composite_key_image (const cryptonote::account_keys &keys, const std::unordered_map< crypto::public_key, cryptonote::subaddress_index > &subaddresses, const crypto::public_key &out_key, const crypto::public_key &tx_public_key, const std::vector< crypto::public_key > &additional_tx_public_keys, std::size_t real_output_index, const std::vector< crypto::key_image > &pkis, crypto::key_image &ki) |
| std::uint32_t | multisig_kex_rounds_required (const std::uint32_t num_signers, const std::uint32_t threshold) |
| std::uint32_t | multisig_setup_rounds_required (const std::uint32_t num_signers, const std::uint32_t threshold) |
| static void | check_multisig_config (const std::uint32_t round, const std::uint32_t threshold, const std::uint32_t num_signers) |
| static crypto::secret_key | calculate_multisig_keypair_from_derivation (const crypto::public_key_memsafe &derivation, crypto::public_key &derived_pubkey_out) |
| static void | make_multisig_common_privkey (std::vector< crypto::secret_key > participant_base_common_privkeys, crypto::secret_key &common_privkey_out) |
| static rct::key | compute_multisig_aggregation_coefficient (const std::vector< crypto::public_key > &sorted_keys, const crypto::public_key &aggregation_key) |
| static crypto::public_key | generate_multisig_aggregate_key (std::vector< crypto::public_key > final_keys, std::vector< crypto::secret_key > &privkeys_inout) |
| static void | multisig_kex_make_round_keys (const crypto::secret_key &base_privkey, multisig_keyset_map_memsafe_t pubkey_origins_map, multisig_keyset_map_memsafe_t &derivation_origins_map_out) |
| static void | check_messages_round (const std::vector< multisig_kex_msg > &expanded_msgs, const std::uint32_t expected_round) |
| static std::uint32_t | multisig_kex_msgs_sanitize_pubkeys (const std::vector< multisig_kex_msg > &expanded_msgs, const std::vector< crypto::public_key > &exclude_pubkeys, multisig_keyset_map_memsafe_t &sanitized_pubkeys_out) |
| static void | remove_key_from_mapped_sets (const crypto::public_key &key_to_remove, multisig_keyset_map_memsafe_t &keyset_inout) |
| static multisig_keyset_map_memsafe_t | evaluate_multisig_kex_round_msgs (const crypto::public_key &base_pubkey, const std::uint32_t expected_round, const std::vector< crypto::public_key > &signers, const std::vector< multisig_kex_msg > &expanded_msgs, const std::vector< crypto::public_key > &exclude_pubkeys, const bool incomplete_signer_set) |
| static multisig_keyset_map_memsafe_t | evaluate_multisig_post_kex_round_msgs (const crypto::public_key &base_pubkey, const std::uint32_t expected_round, const std::vector< crypto::public_key > &signers, const std::vector< multisig_kex_msg > &expanded_msgs, const bool incomplete_signer_set) |
| static void | multisig_kex_process_round_msgs (const crypto::secret_key &base_privkey, const crypto::public_key &base_pubkey, const std::uint32_t current_round, const std::uint32_t threshold, const std::vector< crypto::public_key > &signers, const std::vector< multisig_kex_msg > &expanded_msgs, const std::vector< crypto::public_key > &exclude_pubkeys, const bool incomplete_signer_set, multisig_keyset_map_memsafe_t &keys_to_origins_map_out) |
Variables | |
| list | TEST_CASES |
| list | PUB_ADDRS = [case[2] for case in TEST_CASES] |
multisig account:
:: multisig pubkey: the private key is split, M group participants are required to reassemble (e.g. to sign something)
multisig key exchange:
An 'M-of-N' (M <= N; M >= 1; N >= 2) multisignature key is a public key where at least 'M' out of 'N' possible co-signers must collaborate in order to create a signature.
Constructing a multisig key involves a series of Diffie-Hellman exchanges between participants. At the end of key exchange (kex), each participant will hold a number of private keys. Each private key is shared by a group of (N - M + 1) participants. This way if (N - M) co-signers are missing, every private key will be held by at least one of the remaining M people.
Note on MULTISIG_MAX_SIGNERS: During key exchange, participants will have up to '(N - 1) choose (N - M)' key shares. If N is large, then the max number of key shares (when M = (N-1)/2) can be huge. A limit of N <= 16 was arbitrarily chosen as a power of 2 that can accomodate the vast majority of practical use-cases. To increase the limit, FROST-style key aggregation should be used instead (it is more efficient than DH-based key generation when N - M > 1).
|
static |
INTERNAL
brief: calculate_multisig_keypair_from_derivation - wrapper on calculate_multisig_keypair() for an input public key Converts an input public key into a crypto private key (type cast, does not change serialization), then passes it to get_multisig_blinded_secret_key().
Result:
|
static |
INTERNAL
brief: check_messages_round - Check that a set of messages have an expected round number. param: expanded_msgs - set of multisig kex messages to process param: expected_round - round number the kex messages should have
|
static |
INTERNAL
brief: check_multisig_config - validate multisig configuration details param: round - the round of the message that should be produced param: threshold - threshold for multisig (M in M-of-N) param: num_signers - number of participants in multisig (N)
|
static |
INTERNAL
brief: compute_multisig_aggregation_coefficient - creates aggregation coefficient for a specific public key in a set of public keys
WARNING: The coefficient will only be deterministic if... 1) input keys are pre-sorted
|
static |
INTERNAL
brief: evaluate_multisig_kex_round_msgs - Evaluate pubkeys from a kex round in order to prepare for the next round.
|
static |
INTERNAL
brief: evaluate_multisig_post_kex_round_msgs - Evaluate messages for the post-kex verification round.
|
static |
INTERNAL
brief: generate_multisig_aggregate_key - generates a multisig public spend key via key aggregation Key aggregation via aggregation coefficients prevents key cancellation attacks. See: https://www.getmonero.org/resources/research-lab/pubs/MRL-0009.pdf param: final_keys - address components (public keys) obtained from other participants (not shared with local) param: privkeys_inout - private keys of address components known by local; each key will be multiplied by an aggregation coefficient (return by reference) return: final multisig public spend key for the account
| bool multisig::generate_multisig_composite_key_image | ( | const cryptonote::account_keys & | keys, |
| const std::unordered_map< crypto::public_key, cryptonote::subaddress_index > & | subaddresses, | ||
| const crypto::public_key & | out_key, | ||
| const crypto::public_key & | tx_public_key, | ||
| const std::vector< crypto::public_key > & | additional_tx_public_keys, | ||
| std::size_t | real_output_index, | ||
| const std::vector< crypto::key_image > & | pkis, | ||
| crypto::key_image & | ki ) |
| bool multisig::generate_multisig_key_image | ( | const cryptonote::account_keys & | keys, |
| std::size_t | multisig_key_index, | ||
| const crypto::public_key & | out_key, | ||
| crypto::key_image & | ki ) |
| void multisig::generate_multisig_LR | ( | const crypto::public_key | pkey, |
| const crypto::secret_key & | k, | ||
| crypto::public_key & | L, | ||
| crypto::public_key & | R ) |
| crypto::secret_key multisig::get_multisig_blinded_secret_key | ( | const crypto::secret_key & | key | ) |
get_multisig_blinded_secret_key - converts an input private key into a blinded multisig private key Use 1a: converts account private spend key into multisig private key, which is used for key exchange and message signing Use 1b: converts account private view key into ancillary private key share, for the composite multisig private view key Use 2: converts DH shared secrets (curve points) into private keys, which are intermediate private keys in multisig key exchange
| key | - private key to transform |
|
static |
INTERNAL
brief: make_multisig_common_privkey - Create the 'common' multisig privkey, owned by all multisig participants.
|
static |
INTERNAL
brief: multisig_kex_make_round_keys - Makes a kex round's keys.
|
static |
INTERNAL
brief: multisig_kex_msgs_sanitize_pubkeys - Sanitize multisig kex messages.
origins = all the signing pubkeys that recommended a given pubkey found in input msgs
|
static |
INTERNAL
brief: multisig_kex_process_round_msgs - Process kex messages for the active kex round.
| std::uint32_t multisig::multisig_kex_rounds_required | ( | const std::uint32_t | num_signers, |
| const std::uint32_t | threshold ) |
brief: multisig_kex_rounds_required - The number of key exchange rounds required to produce an M-of-N shared key.
| std::uint32_t multisig::multisig_setup_rounds_required | ( | const std::uint32_t | num_signers, |
| const std::uint32_t | threshold ) |
brief: multisig_setup_rounds_required - The number of setup rounds required to produce an M-of-N shared key.
|
static |
INTERNAL
brief: remove_key_from_mapped_sets - Remove a specified key from the mapped sets in a multisig keyset map. param: key_to_remove - specified key to remove inoutparam: keyset_inout - keyset to update
| list multisig.PUB_ADDRS = [case[2] for case in TEST_CASES] |
| list multisig.TEST_CASES |