CreateMuSig2PartialSig

Produce this participant's MuSig2 partial signature for the session.

Synopsis

Declared in <musig.h>

std::optional<uint256>
CreateMuSig2PartialSig(
    uint256 const& hash,
    CKey const& our_seckey,
    CPubKey const& aggregate_pubkey,
    std::vector<CPubKey> const& pubkeys,
    std::map<CPubKey, std::vector<uint8_t>> const& pubnonces,
    MuSig2SecNonce& secnonce,
    std::vector<std::pair<uint256, bool>> const& tweaks);

Return Value

This participant's partial signature, or std::nullopt on failure.

Parameters

NameDescription
hashThe signature hash being signed.
our_seckeyThis participant's secret key.
aggregate_pubkeyThe aggregate public key of all participants.
pubkeysThe participant public keys, in aggregation order.
pubnoncesThe public nonces from all participants, keyed by public key.
secnonceThis participant's secret nonce for the session.
tweaksThe tweaks to apply to the aggregate key, each with a flag selecting x-only or ordinary tweaking.