sign: Add CreateMuSig2Nonce

This commit is contained in:
Ava Chow
2024-02-12 15:31:16 -05:00
parent 82ea67c607
commit 512b17fc56
7 changed files with 88 additions and 1 deletions

View File

@@ -18,6 +18,8 @@ struct secp256k1_musig_secnonce;
using namespace util::hex_literals;
constexpr uint256 MUSIG_CHAINCODE{"868087ca02a6f974c4598924c36b57762d32cb45717167e300622c7167e38965"_hex_u8};
constexpr size_t MUSIG2_PUBNONCE_SIZE{66};
//! Compute the full aggregate pubkey from the given participant pubkeys in their current order.
//! Outputs the secp256k1_musig_keyagg_cache and validates that the computed aggregate pubkey matches an expected aggregate pubkey.
//! This is necessary for most MuSig2 operations.
@@ -58,4 +60,6 @@ public:
bool IsValid();
};
uint256 MuSig2SessionID(const CPubKey& script_pubkey, const CPubKey& part_pubkey, const uint256& sighash);
#endif // BITCOIN_MUSIG_H