Bitcoin Core
31.99.0
P2P Digital Currency
src
secp256k1
src
modules
musig
keyagg.h
Go to the documentation of this file.
1
/***********************************************************************
2
* Distributed under the MIT software license, see the accompanying *
3
* file COPYING or https://www.opensource.org/licenses/mit-license.php.*
4
***********************************************************************/
5
6
#ifndef SECP256K1_MODULE_MUSIG_KEYAGG_H
7
#define SECP256K1_MODULE_MUSIG_KEYAGG_H
8
9
#include "../../../include/secp256k1.h"
10
#include "../../../include/secp256k1_musig.h"
11
12
#include "../../group.h"
13
#include "../../scalar.h"
14
15
typedef
struct
{
16
secp256k1_ge
pk
;
17
/* If there is no "second" public key, second_pk is set to the point at
18
* infinity */
19
secp256k1_ge
second_pk
;
20
unsigned
char
pks_hash[32];
21
/* tweak is identical to value tacc[v] in the specification. */
22
secp256k1_scalar
tweak
;
23
/* parity_acc corresponds to (1 - gacc[v])/2 in the spec. So if gacc[v] is
24
* -1, parity_acc is 1. Otherwise, parity_acc is 0. */
25
int
parity_acc
;
26
}
secp256k1_keyagg_cache_internal
;
27
28
static
int
secp256k1_keyagg_cache_load
(
const
secp256k1_context
* ctx,
secp256k1_keyagg_cache_internal
*cache_i,
const
secp256k1_musig_keyagg_cache
*cache);
29
30
static
void
secp256k1_musig_keyaggcoef
(
const
secp256k1_hash_ctx
*hash_ctx,
secp256k1_scalar
*r,
const
secp256k1_keyagg_cache_internal
*cache_i,
secp256k1_ge
*
pk
);
31
32
#endif
secp256k1_musig_keyaggcoef
static void secp256k1_musig_keyaggcoef(const secp256k1_hash_ctx *hash_ctx, secp256k1_scalar *r, const secp256k1_keyagg_cache_internal *cache_i, secp256k1_ge *pk)
secp256k1_keyagg_cache_load
static int secp256k1_keyagg_cache_load(const secp256k1_context *ctx, secp256k1_keyagg_cache_internal *cache_i, const secp256k1_musig_keyagg_cache *cache)
tests_wycheproof_generate_ecdh.pk
def pk
Definition:
tests_wycheproof_generate_ecdh.py:115
secp256k1_context_struct
Definition:
secp256k1.c:61
secp256k1_ge
A group element in affine coordinates on the secp256k1 curve, or occasionally on an isomorphic curve ...
Definition:
group.h:16
secp256k1_hash_ctx
Definition:
hash.h:13
secp256k1_keyagg_cache_internal
Definition:
keyagg.h:15
secp256k1_keyagg_cache_internal::parity_acc
int parity_acc
Definition:
keyagg.h:25
secp256k1_keyagg_cache_internal::tweak
secp256k1_scalar tweak
Definition:
keyagg.h:22
secp256k1_keyagg_cache_internal::pk
secp256k1_ge pk
Definition:
keyagg.h:16
secp256k1_keyagg_cache_internal::second_pk
secp256k1_ge second_pk
Definition:
keyagg.h:19
secp256k1_musig_keyagg_cache
This module implements BIP 327 "MuSig2 for BIP340-compatible Multi-Signatures" (https://github....
Definition:
secp256k1_musig.h:43
secp256k1_scalar
A scalar modulo the group order of the secp256k1 curve.
Definition:
scalar_4x64.h:13
Generated on Tue Apr 28 2026 20:00:28 for Bitcoin Core by
1.9.4