Bitcoin Core 31.0.0
P2P Digital Currency
Loading...
Searching...
No Matches
musig.c File Reference
#include <stdio.h>
#include <stdlib.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 38 of file musig.c.

Function Documentation

◆ create_keypair()

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

Definition at line 40 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 179 of file musig.c.

Here is the call graph for this function:

◆ sign()

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 106 of file musig.c.

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

◆ tweak()

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

Definition at line 64 of file musig.c.

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