55 Commits

Author SHA1 Message Date
Jonas Nick
0d540ec942
Merge commits '88e80722 ff8edf89 f29a3270 a7a7bfaf a01a7d86 b1579cf5 ad7433b1 233822d8 5fbff5d3 2b77240b 1bff2005 e1817a6f 5596ec5c 8ebe5c52 1cca7c17 1b21aa51 cbd25559 09b1d466 57573187 8962fc95 9d1b458d eb8749fc 6048e6c0 ' into temp-merge-1222 2023-07-20 16:29:40 +00:00
Jonas Nick
304fc88557
Merge commits '9a8d65f0 75d7b7f5 665ba77e 3f57b9f7 eacad90f 01b819a8 31ed5386 2a39ac16 0eb30004 cbe41ac1 cc3b8a4f ' into temp-merge-1187 2023-07-20 12:19:00 +00:00
Jonas Nick
6c54db1987
Merge commits '2286f809 751c4354 477f02c4 e3f84777 5c789dcd 8c949f56 21ffe4b2 ' into temp-merge-1055 2023-07-18 12:51:17 +00:00
Elliott Jin
ce3cfc78a6 doc: Describe Jacobi calculation in safegcd_implementation.md 2023-02-28 15:57:32 -05:00
Pieter Wuille
5048be17e9 Rename valgrind_ctime_test -> ctime_tests 2023-01-11 16:07:37 -05:00
Jonas Nick
b6b360efaf
doc: improve message of cleanup commit 2022-12-12 22:08:13 +00:00
Jonas Nick
b1f992a552
doc: improve release process
- make version on master always equal to latest release with patch+1
- separate regular from maintenance releases
- add more git commands to prevent accidents
- mention that one needs to somehow deal with release dates
- _LIB_VERSIONS_ -> _LIB_VERSION_
- don't push all tags in step 4
- add required message to git tag
- add suggested commit messages
2022-12-12 19:53:27 +00:00
Jonas Nick
ad39e2dc41
build: change package version to 0.1.0-dev
The suffix -dev is slightly clearer.

Also, since the package version follows semantic versioning, rename
VERSION_BUILD to VERSION_PATCH for clarity.
2022-12-07 22:07:05 +00:00
Jonas Nick
90618e9263
doc: move CHANGELOG from doc/ to root directory 2022-12-06 15:29:50 +00:00
Tim Ruffing
e02d6862bd selftest: Expose in public API 2022-12-05 11:26:44 +01:00
Tim Ruffing
53796d2b24 contexts: Rename static context 2022-12-05 11:26:44 +01:00
Tim Ruffing
316ac7625a contexts: Deprecate all context flags except SECP256K1_CONTEXT_NONE 2022-12-05 11:26:02 +01:00
Tim Ruffing
41e8704b48 build: Enable some modules by default
We don't enable the ECDSA recovery module, because we don't recommend
ECDSA recovery for new protocols. In particular, the recovery API is
prone to misuse: It invites the caller to forget to check the public
key (and the verification function always returns 1).

In general, we also don't recommend ordinary ECDSA for new protocols.
But disabling the ECDSA functions is not possible because they're not
in a module, and let's be honest: disabling ECDSA would mean to ignore
reality blatantly.
2022-08-03 17:09:54 +02:00
Jonas Nick
cc07b8f7a9 musig-spec: remove it 2022-04-05 22:47:17 +00:00
Jonas Nick
c1640b7049
Merge elementsproject/secp256k1-zkp#166: musig-spec: Add naive Python reference implementation
c235e5055f5d76e0cd39dcce3addb8cbd525e1bd musig-spec: Add naive Python reference implementation (Elliott Jin)

Pull request description:

ACKs for top commit:
  jonasnick:
    ACK c235e5055f5d76e0cd39dcce3addb8cbd525e1bd
  real-or-random:
    utACK c235e5055f5d76e0cd39dcce3addb8cbd525e1bd

Tree-SHA512: f0ff8b84730a82d8eab15ac5c46b190af125a87c0c8b3eef88fa5f67c4b7cd88e3d981cae857a99456b72a0edb56ef7f0593e7ed488914f2f4cd070efb579de8
2022-04-05 22:28:18 +00:00
Elliott Jin
c235e5055f musig-spec: Add naive Python reference implementation 2022-04-05 18:18:18 -04:00
Elliott Jin
67247e53af musig-spec: More minor cleanup 2022-04-05 15:30:28 -04:00
Jonas Nick
9a1645f0ef
Merge elementsproject/secp256k1-zkp#184: musig-spec: minor fixups
bf615193ce673c29598db9bd4c316d76647b83cb musig-spec: minor fixups (Jonas Nick)

Pull request description:

ACKs for top commit:
  robot-dreams:
    ACK bf615193ce673c29598db9bd4c316d76647b83cb, thanks!

Tree-SHA512: dff21e4f68640de6087426af934d882146f53392166fb9826bc15fc13490bbb20b4ae94410604567df451ac5875fa3cf17be5f2cc7f7d2ae135aff91b17f3754
2022-04-05 18:47:11 +00:00
Jonas Nick
bf615193ce musig-spec: minor fixups 2022-04-05 18:39:27 +00:00
Elliott Jin
0940575215 musig-spec: Clarify negation for signing and verification 2022-04-05 12:47:36 -04:00
Tim Ruffing
1b292cdb52
Improve writing in Signing flow 2022-04-05 15:01:09 +02:00
Tim Ruffing
a86bfa991a
Merge ElementsProject/secp256k1-zkp#181: musig-spec: clarify hashing in noncegen by converting ints to bytes
376733b58b282a4985dd78d0125749473f0aeff3 musig-spec: clarify hashing in noncegen by converting ints to bytes (Jonas Nick)

Pull request description:

ACKs for top commit:
  real-or-random:
    ACK 376733b58b282a4985dd78d0125749473f0aeff3

Tree-SHA512: c4708c476094d242fe7312177e345932bd40b52549007b43d2e5e4efc094101624d8583647f305bcbd042692a9d0117eda38f71e22fee0e0f49d677d9f512a8e
2022-04-05 10:42:02 +02:00
Jonas Nick
b7f8ea2f2a musig-spec: address robot-dreams' comments
- KeyAggCoeff' -> KeyAggCoeffInternal for consistency
- In Sign, add mod n when calculating d
- In Tweak, reorder the parameters to (Q, gacc, tacc, tweak, is_xonly) because
  the first three are "state" arguments
- Rename Tweak function to ApplyTweak to avoid confusion with tweak (the
  vector). This becomes apparent in the python reference code.
2022-04-04 22:39:38 +00:00
Jonas Nick
376733b58b musig-spec: clarify hashing in noncegen by converting ints to bytes 2022-04-04 21:48:38 +00:00
Tim Ruffing
d903c09fd2 musig-spec: Improve writing in Motivation, Design 2022-04-04 22:11:58 +02:00
Jonas Nick
fd51a6281e musig-spec: add authors 2022-04-04 11:57:00 +00:00
Jonas Nick
f56e223a7a musig-spec: explain NonceGen and tweaking in signing flow context 2022-04-04 11:57:00 +00:00
Jonas Nick
e463ea42bb musig-spec: mention stateless signing in signing flow 2022-04-04 10:42:09 +00:00
Jonas Nick
a29b961eb7 musig-spec: add acknowledgements and improve abstract 2022-04-04 10:42:09 +00:00
Jonas Nick
1a086ba9c9 musig-spec: add optional arguments to strengthen nonce function
This is a defense-in-depth measure that may help if the value is not drawn
uniformly at random. The handling of sk is similar to BIP340.
2022-04-03 09:58:44 +00:00
Jonas Nick
8d04ac318f musig-spec: remove unnecessary and inconsistent input paragraph 2022-04-01 21:26:00 +00:00
Jonas Nick
c715407b4f musig-spec: fix partial sig verification note in intro 2022-04-01 13:12:28 +00:00
Jonas Nick
11fb8a664b musig-spec: expand on signing flow
Also move signing flow before specification because it is slightly more natural.
2022-04-01 13:12:20 +00:00
Jonas Nick
802b7daf23 musig-spec: add motivation and design sections 2022-03-31 09:25:25 +00:00
Jonas Nick
686d96222d musig-spec: various cleanups
- add BIP header & abstract
- rename MuSig to MuSig2 because some people may want to use the 3-round version
- remove applications because we don't need to motivate an informational BIP
- x-only -> X-only
- remove overly repetetitive "The algorithm [...] is defined as"
- move "Remarks" and "Design" out of "Description" section and move "Test
  vectors and ..." into "Description" section. The idea is that the Description
  contains everything that is absolutely required to implement the BIP (safely).
2022-03-27 21:44:10 +00:00
Jonas Nick
ef537b2065 musig-spec: fix unnecessary O(n^2) KeyAgg runtime 2022-03-27 13:30:39 +00:00
Jonas Nick
57eb6b4167 musig-spec: move description of secret key negation to spec
Also fix bug in description that resulted in a wrong definition of t.
And rename keyagg coefficient from 'mu' to 'a' since we don't use the term "musig
coefficient" anymore and a is what is used in the paper.
2022-03-21 22:10:24 +00:00
Jonas Nick
633d01add0 musig-spec: add x-only and ordinary tweaking to musig 2022-03-21 22:10:24 +00:00
Jonas Nick
aee0747e38 musig-spec: add general description of tweaking 2022-03-21 22:10:24 +00:00
Jonas Nick
fb060a0c4e musig-spec: add Session Context to simplify sign/verify/sigagg
Besides reducing the number of arguments, this also removes the R argument from
PartialSigAgg which was not defined precisely:
* The final nonce ''R'' as created during  ''Sign'' or ''PartialSigVerify'': a point

Moreover, this paves the way for adding the tweaking, which requires
PartialSigAgg to also have access to challenge e and can now be easily computed
from the Session Context.
2022-03-21 22:10:24 +00:00
Jonas Nick
3aec4332b5 musig-spec: move remarks on spec below specification section
We will need more of these explanations and it's better if they do not interfere
the specification section. The remarks section is intended for content that's
not required for implementing the spec.
2022-03-21 22:10:24 +00:00
Jonas Nick
628d52c718 musig-spec: fix title/abstract and make algo names bold 2022-03-21 22:10:24 +00:00
Jonas Nick
5b760cc172 musig-spec: consistently call partial sigs psig 2022-03-21 20:47:32 +00:00
Elliott Jin
aa1acb4bd1 musig-spec: improve security argument for handling infinity
Co-authored-by: Tim Ruffing <crypto@timruffing.de>
2022-01-27 05:23:15 -08:00
Jonas Nick
69b392f3cb musig: move explanation for aggnonce=inf to spec 2022-01-24 15:50:42 +00:00
Jonas Nick
4824220bb7 musig-spec: describe NonceGen, NonceAgg, Sign,PartialSig{Verify,Agg} 2022-01-24 15:50:42 +00:00
Jonas Nick
3c122d0780 musig-spec: improve definition of lift_x 2022-01-24 15:50:42 +00:00
Jonas Nick
e0bb2d7009 musig-spec: improve KeyAgg description
It's easier to identify a signer with a public key instead of an index in
KeyAggCoef because it doesn't force the signer to know its index.
2022-01-24 15:50:39 +00:00
Jonas Nick
b8f4e75d89 musig-spec: move to doc directory 2022-01-24 15:45:51 +00:00
Jonas Nick
3ed0d02bf7 doc: add CHANGELOG template 2021-12-23 14:47:15 +00:00