Jonas Nick
938725c1c9
Merge commits 'd7ec49a6 9a5a87e0 aa5d34a8 2a3a97c6 ' into temp-merge-976
...
Also remove remaining uses of ecmult context in secp-zkp and update API tests
accordingly.
2021-09-16 15:21:11 +00:00
Jonas Nick
881b15cb43
Merge elementsproject/secp256k1-zkp#139 : musig: use tagged hash for the list of pubkeys to aggregate
...
8f093be374da794b835302bfb81a72e2bdd51d26 musig: use tagged hash for the list of pubkeys to aggregate (Jonas Nick)
a6a768a4bf3a243609e508c492307cb0fe754bda musig: make key agg test vector more precise (Jonas Nick)
Pull request description:
Top commit has no ACKs.
Tree-SHA512: 5369dc5b4039dd4cda2c50282db2882c088b96e1daa5801240f92be1832ed8f29317fdbfc3cab211707155c284a68dc593967f3141703e2544f6b8dc1553e44d
2021-08-02 11:34:07 +00:00
Andrew Poelstra
2979e4d9d4
Merge commits '8ae56e33 75ce488c 4866178d 446d28d9 253f90cd ec3aaa50 0440945f 7688a4f1 be8d9c26 ' into temp-merge-965
2021-07-27 18:12:45 +00:00
Jonas Nick
8f093be374
musig: use tagged hash for the list of pubkeys to aggregate
...
This is done to use tagged hashing consistently. Changes the musig test vectors.
2021-07-27 11:37:10 +00:00
Jonas Nick
a6a768a4bf
musig: make key agg test vector more precise
2021-07-27 10:06:22 +00:00
Jonas Nick
f27fd1d5e7
musig: improve test coverage of pubkey_combine
2021-07-14 19:59:38 +00:00
Jonas Nick
56014e8ca0
musig: change pubkey_combine arg to array of pointers to pks
...
... instead of taking an array of pubkeys directly
2021-07-14 19:59:38 +00:00
Jonas Nick
4a9b059b16
musig: rename Musig coefficient to KeyAgg coefficient
...
This is done to be consistent with the MuSig2 paper
2021-07-14 19:59:19 +00:00
Jonas Nick
4bc46d836e
musig: optimize key aggregation using const 1 for 2nd key
2021-07-14 19:58:54 +00:00
Jonas Nick
2310849f50
musig: compute musig coefficient by hashing key instead of index
2021-07-14 19:41:38 +00:00
Jonas Nick
9683c8a7eb
musig: add static test vectors for key aggregation
2021-07-14 19:41:38 +00:00
Jonas Nick
649bf201d8
musig: fix tests for 32-bit
2021-03-10 13:20:01 +00:00
Jonas Nick
b9d91b3ecb
musig: add pubkey_tweak_add function to allow taproot tweaking
2020-11-30 15:40:09 +00:00
Jonas Nick
38a8b20991
musig: fix memory leak in musig test
2020-11-13 16:05:37 +00:00
Jonas Nick
5b4eb18ec5
musig: shorten partial nonce byte array from 33 to 32 bytes
2020-11-13 16:05:37 +00:00
Jonas Nick
62f0b2d867
musig: make musig partial nonces byte arrays instead of "pubkeys"
2020-11-13 16:05:37 +00:00
Jonas Nick
2117e7466a
musig: improve variable naming and be consistent with schnorrsig module
...
session_initialize -> session_init
msg_is_set -> is_msg_set
is_negated -> pk_parity
nonce_is_negated -> nonce_parity
2020-11-13 16:05:36 +00:00
Jonas Nick
ebc31f1f9d
musig: add ARG_CHECKs to functions to help debuggability
2020-11-13 16:05:36 +00:00
Jonas Nick
ac2d0e6697
musig: add magic to session to detect if session is uninitalized
2020-11-13 16:05:36 +00:00
Jonas Nick
29b4bd85d7
musig: simplify state machine by adding explicit round to session struct
2020-11-13 16:05:36 +00:00
Jonas Nick
b0917f3de1
Merge remote-tracking branch 'upstream/master' into temp-merge-835
2020-11-05 20:21:38 +00:00
Jonas Nick
23900a0d86
Fix the MuSig module after integrating bip-schnorr updates
...
1. using xonly_pubkeys in MuSig for input public keys and the combined
pk. For that to work we need to store whether the MuSig aggregated point
has an even y in the session, may need to negate each signers secret
key and may need to negate each signers public key in
musig_partial_sig_verify.
2. using a tagged hash for the message hash.
3. use !fe_is_odd in place of fe_is_quad_var
2020-11-04 21:47:09 +00:00
Jonas Nick
96201b4f6e
Require message in musig protocol in an earlier state. In particular,
...
remove the set_msg function and require the message in get_public_nonce
at the latest.
2020-07-24 14:59:36 +02:00
Jonas Nick
4fd0d56e37
Fix my_index in musig state machine tests
2020-07-24 14:59:36 +02:00
Jonas Nick
d924027765
Add tweak32 parameter to musig_partial_sig_combine which allows to sign for p2c/taproot commitments
2020-07-24 14:59:36 +02:00
Jonas Nick
b86c210747
Add MuSig module which allows creating n-of-n multisignatures and adaptor signatures.
2020-07-24 14:59:36 +02:00