Skip to content

Commit a32870b

Browse files
fjahrb-wagn
andcommitted
Experimental: Add incremental half-aggregation for Schnorr signatures
Co-authored-by: Benedikt <crypto@benedikt-wagner.dev>
1 parent 8deef00 commit a32870b

File tree

11 files changed

+741
-32
lines changed

11 files changed

+741
-32
lines changed

.cirrus.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ env:
2222
RECOVERY: no
2323
EXTRAKEYS: no
2424
SCHNORRSIG: no
25+
EXPERIMENTAL: no
26+
SCHNORRSIG_HALFAGG: no
2527
MUSIG: no
2628
ELLSWIFT: no
2729
### test options
@@ -70,6 +72,8 @@ task:
7072
RECOVERY: yes
7173
EXTRAKEYS: yes
7274
SCHNORRSIG: yes
75+
EXPERIMENTAL: yes
76+
SCHNORRSIG_HALFAGG: yes
7377
MUSIG: yes
7478
ELLSWIFT: yes
7579
matrix:
@@ -88,6 +92,8 @@ task:
8892
RECOVERY: yes
8993
EXTRAKEYS: yes
9094
SCHNORRSIG: yes
95+
EXPERIMENTAL: yes
96+
SCHNORRSIG_HALFAGG: yes
9197
MUSIG: yes
9298
ELLSWIFT: yes
9399
WRAPPER_CMD: 'valgrind --error-exitcode=42'

.github/workflows/ci.yml

Lines changed: 31 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ env:
3535
SCHNORRSIG: 'no'
3636
MUSIG: 'no'
3737
ELLSWIFT: 'no'
38+
SCHNORRSIG_HALFAGG: 'no'
3839
### test options
3940
SECP256K1_TEST_ITERS: 64
4041
BENCH: 'yes'
@@ -73,14 +74,15 @@ jobs:
7374
matrix:
7475
configuration:
7576
- env_vars: { WIDEMUL: 'int64', RECOVERY: 'yes' }
76-
- env_vars: { WIDEMUL: 'int64', ECDH: 'yes', EXTRAKEYS: 'yes', SCHNORRSIG: 'yes', MUSIG: 'yes', ELLSWIFT: 'yes' }
77+
- env_vars: { WIDEMUL: 'int64', ECDH: 'yes', EXTRAKEYS: 'yes', SCHNORRSIG: 'yes', MUSIG: 'yes', ELLSWIFT: 'yes', EXPERIMENTAL: 'yes', SCHNORRSIG_HALFAGG: 'yes' }
7778
- env_vars: { WIDEMUL: 'int128' }
7879
- env_vars: { WIDEMUL: 'int128_struct', ELLSWIFT: 'yes' }
7980
- env_vars: { WIDEMUL: 'int128', RECOVERY: 'yes', EXTRAKEYS: 'yes', SCHNORRSIG: 'yes', MUSIG: 'yes', ELLSWIFT: 'yes' }
80-
- env_vars: { WIDEMUL: 'int128', ECDH: 'yes', EXTRAKEYS: 'yes', SCHNORRSIG: 'yes', MUSIG: 'yes' }
81+
- env_vars: { WIDEMUL: 'int128', ECDH: 'yes', EXTRAKEYS: 'yes', SCHNORRSIG: 'yes', MUSIG: 'yes', EXPERIMENTAL: 'yes', SCHNORRSIG_HALFAGG: 'yes' }
8182
- env_vars: { WIDEMUL: 'int128', ASM: 'x86_64', ELLSWIFT: 'yes' }
82-
- env_vars: { RECOVERY: 'yes', EXTRAKEYS: 'yes', SCHNORRSIG: 'yes', MUSIG: 'yes' }
83-
- env_vars: { CTIMETESTS: 'no', RECOVERY: 'yes', ECDH: 'yes', EXTRAKEYS: 'yes', SCHNORRSIG: 'yes', MUSIG: 'yes', CPPFLAGS: '-DVERIFY' }
83+
84+
- env_vars: { RECOVERY: 'yes', EXTRAKEYS: 'yes', SCHNORRSIG: 'yes', MUSIG: 'yes', EXPERIMENTAL: 'yes', SCHNORRSIG_HALFAGG: 'yes' }
85+
- env_vars: { CTIMETESTS: 'no', RECOVERY: 'yes', ECDH: 'yes', EXTRAKEYS: 'yes', SCHNORRSIG: 'yes', MUSIG: 'yes', EXPERIMENTAL: 'yes', SCHNORRSIG_HALFAGG: 'yes', CPPFLAGS: '-DVERIFY' }
8486
- env_vars: { BUILD: 'distcheck', WITH_VALGRIND: 'no', CTIMETESTS: 'no', BENCH: 'no' }
8587
- env_vars: { CPPFLAGS: '-DDETERMINISTIC' }
8688
- env_vars: { CFLAGS: '-O0', CTIMETESTS: 'no' }
@@ -143,6 +145,8 @@ jobs:
143145
RECOVERY: 'yes'
144146
EXTRAKEYS: 'yes'
145147
SCHNORRSIG: 'yes'
148+
EXPERIMENTAL: 'yes'
149+
SCHNORRSIG_HALFAGG: 'yes'
146150
MUSIG: 'yes'
147151
ELLSWIFT: 'yes'
148152
CC: ${{ matrix.cc }}
@@ -189,6 +193,8 @@ jobs:
189193
RECOVERY: 'yes'
190194
EXTRAKEYS: 'yes'
191195
SCHNORRSIG: 'yes'
196+
EXPERIMENTAL: 'yes'
197+
SCHNORRSIG_HALFAGG: 'yes'
192198
MUSIG: 'yes'
193199
ELLSWIFT: 'yes'
194200
CTIMETESTS: 'no'
@@ -242,6 +248,8 @@ jobs:
242248
RECOVERY: 'yes'
243249
EXTRAKEYS: 'yes'
244250
SCHNORRSIG: 'yes'
251+
EXPERIMENTAL: 'yes'
252+
SCHNORRSIG_HALFAGG: 'yes'
245253
MUSIG: 'yes'
246254
ELLSWIFT: 'yes'
247255
CTIMETESTS: 'no'
@@ -289,6 +297,8 @@ jobs:
289297
RECOVERY: 'yes'
290298
EXTRAKEYS: 'yes'
291299
SCHNORRSIG: 'yes'
300+
EXPERIMENTAL: 'yes'
301+
SCHNORRSIG_HALFAGG: 'yes'
292302
MUSIG: 'yes'
293303
ELLSWIFT: 'yes'
294304
CTIMETESTS: 'no'
@@ -346,6 +356,8 @@ jobs:
346356
RECOVERY: 'yes'
347357
EXTRAKEYS: 'yes'
348358
SCHNORRSIG: 'yes'
359+
EXPERIMENTAL: 'yes'
360+
SCHNORRSIG_HALFAGG: 'yes'
349361
MUSIG: 'yes'
350362
ELLSWIFT: 'yes'
351363
CTIMETESTS: 'no'
@@ -400,6 +412,8 @@ jobs:
400412
RECOVERY: 'yes'
401413
EXTRAKEYS: 'yes'
402414
SCHNORRSIG: 'yes'
415+
EXPERIMENTAL: 'yes'
416+
SCHNORRSIG_HALFAGG: 'yes'
403417
MUSIG: 'yes'
404418
ELLSWIFT: 'yes'
405419
CTIMETESTS: 'no'
@@ -453,6 +467,8 @@ jobs:
453467
RECOVERY: 'yes'
454468
EXTRAKEYS: 'yes'
455469
SCHNORRSIG: 'yes'
470+
EXPERIMENTAL: 'yes'
471+
SCHNORRSIG_HALFAGG: 'yes'
456472
MUSIG: 'yes'
457473
ELLSWIFT: 'yes'
458474
CTIMETESTS: 'no'
@@ -519,6 +535,8 @@ jobs:
519535
RECOVERY: 'yes'
520536
EXTRAKEYS: 'yes'
521537
SCHNORRSIG: 'yes'
538+
EXPERIMENTAL: 'yes'
539+
SCHNORRSIG_HALFAGG: 'yes'
522540
MUSIG: 'yes'
523541
ELLSWIFT: 'yes'
524542
CC: 'clang'
@@ -567,6 +585,8 @@ jobs:
567585
RECOVERY: 'yes'
568586
EXTRAKEYS: 'yes'
569587
SCHNORRSIG: 'yes'
588+
EXPERIMENTAL: 'yes'
589+
SCHNORRSIG_HALFAGG: 'yes'
570590
MUSIG: 'yes'
571591
ELLSWIFT: 'yes'
572592
CTIMETESTS: 'no'
@@ -686,13 +706,13 @@ jobs:
686706
fail-fast: false
687707
matrix:
688708
env_vars:
689-
- { WIDEMUL: 'int64', RECOVERY: 'yes', ECDH: 'yes', EXTRAKEYS: 'yes', SCHNORRSIG: 'yes', ELLSWIFT: 'yes' }
709+
- { WIDEMUL: 'int64', RECOVERY: 'yes', ECDH: 'yes', EXTRAKEYS: 'yes', SCHNORRSIG: 'yes', ELLSWIFT: 'yes', EXPERIMENTAL: 'yes', SCHNORRSIG_HALFAGG: 'yes' }
690710
- { WIDEMUL: 'int128_struct', ECMULTGENPRECISION: 2, ECMULTWINDOW: 4 }
691-
- { WIDEMUL: 'int128', ECDH: 'yes', EXTRAKEYS: 'yes', SCHNORRSIG: 'yes', ELLSWIFT: 'yes' }
711+
- { WIDEMUL: 'int128', ECDH: 'yes', EXTRAKEYS: 'yes', SCHNORRSIG: 'yes', ELLSWIFT: 'yes', EXPERIMENTAL: 'yes', SCHNORRSIG_HALFAGG: 'yes' }
692712
- { WIDEMUL: 'int128', RECOVERY: 'yes' }
693-
- { WIDEMUL: 'int128', RECOVERY: 'yes', ECDH: 'yes', EXTRAKEYS: 'yes', SCHNORRSIG: 'yes', ELLSWIFT: 'yes' }
694-
- { WIDEMUL: 'int128', RECOVERY: 'yes', ECDH: 'yes', EXTRAKEYS: 'yes', SCHNORRSIG: 'yes', ELLSWIFT: 'yes', CC: 'gcc' }
695-
- { WIDEMUL: 'int128', RECOVERY: 'yes', ECDH: 'yes', EXTRAKEYS: 'yes', SCHNORRSIG: 'yes', ELLSWIFT: 'yes', CPPFLAGS: '-DVERIFY' }
713+
- { WIDEMUL: 'int128', RECOVERY: 'yes', ECDH: 'yes', EXTRAKEYS: 'yes', SCHNORRSIG: 'yes', ELLSWIFT: 'yes', EXPERIMENTAL: 'yes', SCHNORRSIG_HALFAGG: 'yes' }
714+
- { WIDEMUL: 'int128', RECOVERY: 'yes', ECDH: 'yes', EXTRAKEYS: 'yes', SCHNORRSIG: 'yes', ELLSWIFT: 'yes', CC: 'gcc', EXPERIMENTAL: 'yes', SCHNORRSIG_HALFAGG: 'yes' }
715+
- { WIDEMUL: 'int128', RECOVERY: 'yes', ECDH: 'yes', EXTRAKEYS: 'yes', SCHNORRSIG: 'yes', ELLSWIFT: 'yes', CPPFLAGS: '-DVERIFY', EXPERIMENTAL: 'yes', SCHNORRSIG_HALFAGG: 'yes' }
696716
- BUILD: 'distcheck'
697717

698718
steps:
@@ -800,6 +820,8 @@ jobs:
800820
RECOVERY: 'yes'
801821
EXTRAKEYS: 'yes'
802822
SCHNORRSIG: 'yes'
823+
EXPERIMENTAL: 'yes'
824+
SCHNORRSIG_HALFAGG: 'yes'
803825
MUSIG: 'yes'
804826
ELLSWIFT: 'yes'
805827

Makefile.am

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -300,3 +300,7 @@ endif
300300
if ENABLE_MODULE_ELLSWIFT
301301
include src/modules/ellswift/Makefile.am.include
302302
endif
303+
304+
if ENABLE_MODULE_SCHNORRSIG_HALFAGG
305+
include src/modules/schnorrsig_halfagg/Makefile.am.include
306+
endif

ci/ci.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ print_environment() {
1313
# does not rely on bash.
1414
for var in WERROR_CFLAGS MAKEFLAGS BUILD \
1515
ECMULTWINDOW ECMULTGENKB ASM WIDEMUL WITH_VALGRIND EXTRAFLAGS \
16-
EXPERIMENTAL ECDH RECOVERY EXTRAKEYS MUSIG SCHNORRSIG ELLSWIFT \
16+
EXPERIMENTAL ECDH RECOVERY SCHNORRSIG SCHNORRSIG_HALFAGG MUSIG ELLSWIFT \
1717
SECP256K1_TEST_ITERS BENCH SECP256K1_BENCH_ITERS CTIMETESTS\
1818
EXAMPLES \
1919
HOST WRAPPER_CMD \
@@ -79,6 +79,7 @@ esac
7979
--enable-module-ellswift="$ELLSWIFT" \
8080
--enable-module-extrakeys="$EXTRAKEYS" \
8181
--enable-module-schnorrsig="$SCHNORRSIG" \
82+
--enable-module-schnorrsig-halfagg="$SCHNORRSIG_HALFAGG" \
8283
--enable-module-musig="$MUSIG" \
8384
--enable-examples="$EXAMPLES" \
8485
--enable-ctime-tests="$CTIMETESTS" \

configure.ac

Lines changed: 36 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,10 @@ AC_ARG_ENABLE(module_musig,
188188
AS_HELP_STRING([--enable-module-musig],[enable MuSig2 module [default=yes]]), [],
189189
[SECP_SET_DEFAULT([enable_module_musig], [yes], [yes])])
190190

191+
AC_ARG_ENABLE(module_schnorrsig_halfagg,
192+
AS_HELP_STRING([--enable-module-schnorrsig-halfagg],[enable schnorrsig half-aggregation module (experimental) [default=no]]), [],
193+
[SECP_SET_DEFAULT([enable_module_schnorrsig_halfagg], [no], [yes])])
194+
191195
AC_ARG_ENABLE(module_ellswift,
192196
AS_HELP_STRING([--enable-module-ellswift],[enable ElligatorSwift module [default=yes]]), [],
193197
[SECP_SET_DEFAULT([enable_module_ellswift], [yes], [yes])])
@@ -398,6 +402,11 @@ SECP_CFLAGS="$SECP_CFLAGS $WERROR_CFLAGS"
398402

399403
# Processing must be done in a reverse topological sorting of the dependency graph
400404
# (dependent module first).
405+
if test x"$enable_module_schnorrsig_halfagg" = x"yes"; then
406+
SECP_CONFIG_DEFINES="$SECP_CONFIG_DEFINES -DENABLE_MODULE_SCHNORRSIG_HALFAGG=1"
407+
enable_module_schnorrsig=yes
408+
fi
409+
401410
if test x"$enable_module_ellswift" = x"yes"; then
402411
SECP_CONFIG_DEFINES="$SECP_CONFIG_DEFINES -DENABLE_MODULE_ELLSWIFT=1"
403412
fi
@@ -442,6 +451,9 @@ if test x"$enable_experimental" = x"no"; then
442451
if test x"$set_asm" = x"arm32"; then
443452
AC_MSG_ERROR([ARM32 assembly is experimental. Use --enable-experimental to allow.])
444453
fi
454+
if test x"$enable_module_schnorrsig_halfagg" = x"yes"; then
455+
AC_MSG_ERROR([Schnorrsig Half-Aggregation module is experimental. Use --enable-experimental to allow.])
456+
fi
445457
fi
446458

447459
###
@@ -461,6 +473,7 @@ AM_CONDITIONAL([ENABLE_MODULE_ECDH], [test x"$enable_module_ecdh" = x"yes"])
461473
AM_CONDITIONAL([ENABLE_MODULE_RECOVERY], [test x"$enable_module_recovery" = x"yes"])
462474
AM_CONDITIONAL([ENABLE_MODULE_EXTRAKEYS], [test x"$enable_module_extrakeys" = x"yes"])
463475
AM_CONDITIONAL([ENABLE_MODULE_SCHNORRSIG], [test x"$enable_module_schnorrsig" = x"yes"])
476+
AM_CONDITIONAL([ENABLE_MODULE_SCHNORRSIG_HALFAGG], [test x"$enable_module_schnorrsig_halfagg" = x"yes"])
464477
AM_CONDITIONAL([ENABLE_MODULE_MUSIG], [test x"$enable_module_musig" = x"yes"])
465478
AM_CONDITIONAL([ENABLE_MODULE_ELLSWIFT], [test x"$enable_module_ellswift" = x"yes"])
466479
AM_CONDITIONAL([USE_EXTERNAL_ASM], [test x"$enable_external_asm" = x"yes"])
@@ -474,33 +487,34 @@ AC_OUTPUT
474487

475488
echo
476489
echo "Build Options:"
477-
echo " with external callbacks = $enable_external_default_callbacks"
478-
echo " with benchmarks = $enable_benchmark"
479-
echo " with tests = $enable_tests"
480-
echo " with ctime tests = $enable_ctime_tests"
481-
echo " with coverage = $enable_coverage"
482-
echo " with examples = $enable_examples"
483-
echo " module ecdh = $enable_module_ecdh"
484-
echo " module recovery = $enable_module_recovery"
485-
echo " module extrakeys = $enable_module_extrakeys"
486-
echo " module schnorrsig = $enable_module_schnorrsig"
487-
echo " module musig = $enable_module_musig"
488-
echo " module ellswift = $enable_module_ellswift"
490+
echo " with external callbacks = $enable_external_default_callbacks"
491+
echo " with benchmarks = $enable_benchmark"
492+
echo " with tests = $enable_tests"
493+
echo " with ctime tests = $enable_ctime_tests"
494+
echo " with coverage = $enable_coverage"
495+
echo " with examples = $enable_examples"
496+
echo " module ecdh = $enable_module_ecdh"
497+
echo " module recovery = $enable_module_recovery"
498+
echo " module extrakeys = $enable_module_extrakeys"
499+
echo " module schnorrsig = $enable_module_schnorrsig"
500+
echo " module schnorrsig-halfagg = $enable_module_schnorrsig_halfagg"
501+
echo " module musig = $enable_module_musig"
502+
echo " module ellswift = $enable_module_ellswift"
489503
echo
490-
echo " asm = $set_asm"
491-
echo " ecmult window size = $set_ecmult_window"
492-
echo " ecmult gen table size = $set_ecmult_gen_kb KiB"
504+
echo " asm = $set_asm"
505+
echo " ecmult window size = $set_ecmult_window"
506+
echo " ecmult gen table size = $set_ecmult_gen_kb KiB"
493507
# Hide test-only options unless they're used.
494508
if test x"$set_widemul" != xauto; then
495-
echo " wide multiplication = $set_widemul"
509+
echo " wide multiplication = $set_widemul"
496510
fi
497511
echo
498-
echo " valgrind = $enable_valgrind"
499-
echo " CC = $CC"
500-
echo " CPPFLAGS = $CPPFLAGS"
501-
echo " SECP_CFLAGS = $SECP_CFLAGS"
502-
echo " CFLAGS = $CFLAGS"
503-
echo " LDFLAGS = $LDFLAGS"
512+
echo " valgrind = $enable_valgrind"
513+
echo " CC = $CC"
514+
echo " CPPFLAGS = $CPPFLAGS"
515+
echo " SECP_CFLAGS = $SECP_CFLAGS"
516+
echo " CFLAGS = $CFLAGS"
517+
echo " LDFLAGS = $LDFLAGS"
504518

505519
if test x"$print_msan_notice" = x"yes"; then
506520
echo
Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
#ifndef SECP256K1_SCHNORRSIG_HALFAGG_H
2+
#define SECP256K1_SCHNORRSIG_HALFAGG_H
3+
4+
#include "secp256k1.h"
5+
#include "secp256k1_extrakeys.h"
6+
7+
#ifdef __cplusplus
8+
extern "C" {
9+
#endif
10+
11+
12+
/** Incrementally (Half-)Aggregate a sequence of Schnorr
13+
* signatures to an existing half-aggregate signature.
14+
*
15+
* Returns 1 on success, 0 on failure.
16+
* Args: ctx: a secp256k1 context object.
17+
* In/Out: aggsig: pointer to the serialized aggregate signature
18+
* that is input. The first 32*(n_before+1) of this
19+
* array should hold the input aggsig. It will be
20+
* overwritten by the new serialized aggregate signature.
21+
* It should be large enough for that, see aggsig_len.
22+
* aggsig_len: size of aggsig array in bytes.
23+
* Should be large enough to hold the new
24+
* serialized aggregate signature, i.e.,
25+
* should satisfy aggsig_size >= 32*(n_before+n_new+1).
26+
* It will be overwritten to be the exact size of the
27+
* resulting aggsig.
28+
* In: all_pubkeys: Array of (n_before + n_new) many x-only public keys,
29+
* including both the ones for the already aggregated signature
30+
* and the ones for the signatures that should be added.
31+
* Can only be NULL if n_before + n_new is 0.
32+
* all_msgs32: Array of (n_before + n_new) many 32-byte messages,
33+
* including both the ones for the already aggregated signature
34+
* and the ones for the signatures that should be added.
35+
* Can only be NULL if n_before + n_new is 0.
36+
* new_sigs64: Array of n_new many 64-byte signatures, containing the new
37+
* signatures that should be added. Can only be NULL if n_new is 0.
38+
* n_before: Number of signatures that have already been aggregated
39+
* in the input aggregate signature.
40+
* n_new: Number of signatures that should now be added
41+
* to the aggregate signature.
42+
*/
43+
SECP256K1_API int secp256k1_schnorrsig_inc_aggregate(
44+
const secp256k1_context *ctx,
45+
unsigned char *aggsig,
46+
size_t *aggsig_len,
47+
const secp256k1_xonly_pubkey* all_pubkeys,
48+
const unsigned char *all_msgs32,
49+
const unsigned char *new_sigs64,
50+
size_t n_before,
51+
size_t n_new
52+
) SECP256K1_ARG_NONNULL(1) SECP256K1_ARG_NONNULL(2) SECP256K1_ARG_NONNULL(3);
53+
54+
/** (Half-)Aggregate a sequence of Schnorr signatures.
55+
*
56+
* Returns 1 on success, 0 on failure.
57+
* Args: ctx: a secp256k1 context object.
58+
* Out: aggsig: pointer to an array of aggsig_len many bytes to
59+
* store the serialized aggregate signature.
60+
* In/Out: aggsig_len: size of the aggsig array that is passed in bytes;
61+
* will be overwritten to be the exact size of aggsig.
62+
* In: pubkeys: Array of n many x-only public keys.
63+
* Can only be NULL if n is 0.
64+
* msgs32: Array of n many 32-byte messages.
65+
* Can only be NULL if n is 0.
66+
* sigs64: Array of n many 64-byte signatures.
67+
* Can only be NULL if n is 0.
68+
* n: number of signatures to be aggregated.
69+
*/
70+
SECP256K1_API int secp256k1_schnorrsig_aggregate(
71+
const secp256k1_context *ctx,
72+
unsigned char *aggsig,
73+
size_t *aggsig_len,
74+
const secp256k1_xonly_pubkey *pubkeys,
75+
const unsigned char *msgs32,
76+
const unsigned char *sigs64,
77+
size_t n
78+
) SECP256K1_ARG_NONNULL(1) SECP256K1_ARG_NONNULL(2) SECP256K1_ARG_NONNULL(3);
79+
80+
/** Verify a (Half-)aggregate Schnorr signature.
81+
*
82+
* Returns: 1: correct signature.
83+
* 0: incorrect signature.
84+
* Args: ctx: a secp256k1 context object.
85+
* In: pubkeys: Array of n many x-only public keys. Can only be NULL if n is 0.
86+
* msgs32: Array of n many 32-byte messages. Can only be NULL if n is 0.
87+
* n: number of signatures to that have been aggregated.
88+
* aggsig: Pointer to an array of aggsig_size many bytes
89+
* containing the serialized aggregate
90+
* signature to be verified.
91+
* aggsig_len: Size of the aggregate signature in bytes.
92+
* Should be aggsig_len = 32*(n+1)
93+
*/
94+
SECP256K1_API SECP256K1_WARN_UNUSED_RESULT int secp256k1_schnorrsig_aggverify(
95+
const secp256k1_context *ctx,
96+
const secp256k1_xonly_pubkey *pubkeys,
97+
const unsigned char *msgs32,
98+
size_t n,
99+
const unsigned char *aggsig,
100+
size_t aggsig_len
101+
) SECP256K1_ARG_NONNULL(1) SECP256K1_ARG_NONNULL(5);
102+
103+
#ifdef __cplusplus
104+
}
105+
#endif
106+
107+
#endif /* SECP256K1_SCHNORRSIG_HALFAGG_H */
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
include_HEADERS += include/secp256k1_schnorrsig_halfagg.h
2+
noinst_HEADERS += src/modules/schnorrsig_halfagg/main_impl.h
3+
noinst_HEADERS += src/modules/schnorrsig_halfagg/tests_impl.h

0 commit comments

Comments
 (0)