Bitcoin Core 28.99.0
P2P Digital Currency
Classes | Macros | Functions
musig.c File Reference
#include <stdio.h>
#include <assert.h>
#include <string.h>
#include <secp256k1.h>
#include <secp256k1_extrakeys.h>
#include <secp256k1_musig.h>
#include <secp256k1_schnorrsig.h>
#include "examples_util.h"
Include dependency graph for musig.c:

Go to the source code of this file.

Classes

struct  signer_secrets
 This file demonstrates how to use the MuSig module to create a 3-of-3 multisignature. More...
 
struct  signer
 

Macros

#define N_SIGNERS   3
 

Functions

static int create_keypair (const secp256k1_context *ctx, struct signer_secrets *signer_secrets, struct signer *signer)
 
static int tweak (const secp256k1_context *ctx, secp256k1_xonly_pubkey *agg_pk, secp256k1_musig_keyagg_cache *cache)
 
static int sign (const secp256k1_context *ctx, struct signer_secrets *signer_secrets, struct signer *signer, const secp256k1_musig_keyagg_cache *cache, const unsigned char *msg32, unsigned char *sig64)
 
int main (void)
 

Macro Definition Documentation

◆ N_SIGNERS

#define N_SIGNERS   3

Definition at line 37 of file musig.c.

Function Documentation

◆ create_keypair()

static int create_keypair ( const secp256k1_context ctx,
struct signer_secrets signer_secrets,
struct signer signer 
)
static

Definition at line 39 of file musig.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ main()

int main ( void  )

Definition at line 178 of file musig.c.

Here is the call graph for this function:

◆ sign()

static int sign ( const secp256k1_context ctx,
struct signer_secrets signer_secrets,
struct signer signer,
const secp256k1_musig_keyagg_cache cache,
const unsigned char *  msg32,
unsigned char *  sig64 
)
static

Definition at line 105 of file musig.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ tweak()

static int tweak ( const secp256k1_context ctx,
secp256k1_xonly_pubkey agg_pk,
secp256k1_musig_keyagg_cache cache 
)
static

Definition at line 63 of file musig.c.

Here is the call graph for this function:
Here is the caller graph for this function: