Bitcoin Core
31.1.0
P2P Digital Currency
Toggle main menu visibility
Loading...
Searching...
No Matches
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
(
secp256k1_scalar
*r,
const
secp256k1_keyagg_cache_internal
*cache_i,
secp256k1_ge
*pk);
31
32
#endif
group.h
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)
secp256k1_musig_keyaggcoef
static void secp256k1_musig_keyaggcoef(secp256k1_scalar *r, const secp256k1_keyagg_cache_internal *cache_i, secp256k1_ge *pk)
scalar.h
secp256k1.h
secp256k1_context
struct secp256k1_context_struct secp256k1_context
Unless explicitly stated all pointer arguments must not be NULL.
Definition
secp256k1.h:50
secp256k1_musig.h
secp256k1_ge
A group element in affine coordinates on the secp256k1 curve, or occasionally on an isomorphic curve ...
Definition
group.h:16
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_keyagg_cache_internal::pks_hash
unsigned char pks_hash[32]
Definition
keyagg.h:20
secp256k1_musig_keyagg_cache
This module implements BIP 327 "MuSig2 for BIP340-compatibleMulti-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
for Bitcoin Core by
1.17.0