Bitcoin Core  29.1.0
P2P Digital Currency
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 {
17  /* If there is no "second" public key, second_pk is set to the point at
18  * infinity */
20  unsigned char pks_hash[32];
21  /* tweak is identical to value tacc[v] in the specification. */
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. */
27 
29 
31 
32 #endif
This module implements BIP 327 "MuSig2 for BIP340-compatible Multi-Signatures" (https://github.com/bitcoin/bips/blob/master/bip-0327.mediawiki) v1.0.0.
static void secp256k1_musig_keyaggcoef(secp256k1_scalar *r, const secp256k1_keyagg_cache_internal *cache_i, secp256k1_ge *pk)
A group element in affine coordinates on the secp256k1 curve, or occasionally on an isomorphic curve ...
Definition: group.h:16
secp256k1_scalar tweak
Definition: keyagg.h:22
A scalar modulo the group order of the secp256k1 curve.
Definition: scalar_4x64.h:13
static int secp256k1_keyagg_cache_load(const secp256k1_context *ctx, secp256k1_keyagg_cache_internal *cache_i, const secp256k1_musig_keyagg_cache *cache)