Andrew Poelstra
47efb5e39a
ecdsa-s2c: add ctime tests
2020-12-21 20:50:19 +00:00
Andrew Poelstra
396b558273
ecdsa-s2c: add anti-klepto protocol
...
Co-authored-by: Marko Bencun <mbencun+pgp@gmail.com>
Co-authored-by: Jonas Nick <jonasd.nick@gmail.com>
2020-12-21 20:50:19 +00:00
Andrew Poelstra
290dee566e
ecdsa-s2c: add actual sign-to-contract functionality
...
Co-authored-by: Marko Bencun <mbencun+pgp@gmail.com>
Co-authored-by: Jonas Nick <jonasd.nick@gmail.com>
2020-12-21 20:50:17 +00:00
Andrew Poelstra
8e46cac5b3
ecdsa-s2c: block in module
...
Co-authored-by: Marko Bencun <mbencun+pgp@gmail.com>
Co-authored-by: Jonas Nick <jonasd.nick@gmail.com>
2020-12-21 20:49:41 +00:00
Andrew Poelstra
826bd04b43
add eccommit functionality
...
Co-authored-by: Marko Bencun <mbencun+pgp@gmail.com>
Co-authored-by: Jonas Nick <jonasd.nick@gmail.com>
2020-12-21 20:49:41 +00:00
Elichai Turkel
33cb3c2b1f
Add secret key extraction from keypair to constant time tests
2020-12-19 11:01:36 +02:00
Elichai Turkel
36d9dc1e8e
Add seckey extraction from keypair to the extrakeys tests
2020-12-19 11:00:25 +02:00
Elichai Turkel
fc96aa73f5
Add a function to extract the secretkey from a keypair
2020-12-19 11:00:25 +02:00
Jonas Nick
98dac87839
Merge #858 : Fix insecure links
...
07aa4c70ffb96d21e496854f823c3ea3353b9086 Fix insecure links (Dimitris Apostolou)
Pull request description:
ACKs for top commit:
sipa:
ACK 07aa4c70ffb96d21e496854f823c3ea3353b9086. Verified all the modified links.
jonasnick:
ACK 07aa4c70ffb96d21e496854f823c3ea3353b9086
Tree-SHA512: d1240aab5e40a204c75fca1049b99af9890684df7dbce4167b1904f73424c8a4f84ed85a8cc315501f1b7cf1674d744232b9f2126dff31e3d47e4f3fc65764d4
2020-12-18 18:33:03 +00:00
Dimitris Apostolou
07aa4c70ff
Fix insecure links
2020-12-18 00:24:22 +02:00
Tim Ruffing
b61f9da54e
Merge #857 : docs: fix simple typo, dependecy -> dependency
...
18aadf9d288a54533376cb94f655d059eb1f098e docs: fix simple typo, dependecy -> dependency (Tim Gates)
Pull request description:
There is a small typo in src/group_impl.h.
Should read `dependency` rather than `dependecy`.
ACKs for top commit:
real-or-random:
ACK 18aadf9d288a54533376cb94f655d059eb1f098e
Tree-SHA512: 3529f43bcc87ea8940ecf5af765951f61d97d1efa86fd8abc29e32b600fd449165a94a2fa525bc6b3d9a7d8aa6e691cc4d42033537b196ba166a867e6db7f397
2020-12-09 18:05:58 +01:00
Tim Gates
18aadf9d28
docs: fix simple typo, dependecy -> dependency
...
There is a small typo in src/group_impl.h.
Should read `dependency` rather than `dependecy`.
2020-12-08 21:45:13 +11:00
Jonas Nick
2d9e7175c6
Merge #852 : Add sage script for generating scalar_split_lambda constants
...
329a2e0a3f2d9e936179cbf079773538f95bee33 sage: Add script for generating scalar_split_lambda constants (Tim Ruffing)
f554dfc7088c6ca8d4aff927a51bd889b29dc186 sage: Reorganize files (Tim Ruffing)
Pull request description:
ACKs for top commit:
sipa:
ACK 329a2e0a3f2d9e936179cbf079773538f95bee33
Tree-SHA512: d41fe5eba332f48af0b800778aa076925c4e8e95ec21c4371a500ddd6088b6d52961bdb93f7ce2b127e18095667dbb966a0d14191177f0d0e78dfaf55271d5e2
2020-12-07 21:49:32 +00:00
Tim Ruffing
dc6e5c3a5c
Merge #854 : Rename msg32 to msghash32 in ecdsa_sign/verify and add explanation
...
6e85d675aaf9dc17842096f9cbf8cfab216c9331 Rename tweak to tweak32 in public API (Jonas Nick)
f587f04e35719883546afd54cb491ead18eb6fc7 Rename msg32 to msghash32 in ecdsa_sign/verify and add explanation (Jonas Nick)
Pull request description:
This fixes #307 if there's nothing else that's confusing.
ACKs for top commit:
real-or-random:
ACK 6e85d675aaf9dc17842096f9cbf8cfab216c9331 I inspected the diff
Tree-SHA512: 1b0dc9dfffd497058dc39c962a512ed6d7f89218020fef9d2c03aaae1aefbf272b918c4fe6503434b62547714855fe1b8b89f2366f3ae6cde16143207c9e6b86
2020-12-07 22:10:47 +01:00
Jonas Nick
6e85d675aa
Rename tweak to tweak32 in public API
2020-12-04 14:16:43 +00:00
Jonas Nick
f587f04e35
Rename msg32 to msghash32 in ecdsa_sign/verify and add explanation
2020-12-04 14:12:38 +00:00
Jonas Nick
0129b77767
Merge #113 : Upstream PRs #849 #851
...
f4fa8d226a95e42b252c07edb425c446370e01c0 forbid a test iteration of 0 or less (Andrew Poelstra)
0ce45548813709d828cb3abcc7db4c9ce6e26907 make test count iteration configurable by environment variable (Andrew Poelstra)
13c88efed0005eb6745a222963ee74564054eafb Convert Sage code to Python 3 (as used by Sage >= 9) (Frédéric Chapoton)
Pull request description:
Top commit has no ACKs.
Tree-SHA512: b17847a02843a36630a3c05065e0bda6895e042bbfd045feb2ad64e278a02842a80d66b6416eb3a6768f4b2f6c8f639fb293a537dff90a353624aff737058b8f
2020-12-04 13:49:30 +00:00
Jonas Nick
e1756dfddc
Merge commits '3a106966 8f0c6f15 ' into temp-merge-851
2020-12-04 11:50:18 +00:00
Jonas Nick
7093e633b8
Merge pull request #106 from apoelstra/2020-11-reduce-test-rounds
...
reduce test rounds for rangeproof and surjectionproof
2020-12-03 16:04:38 +00:00
Andrew Poelstra
29f9a7dc62
reduce test rounds for rangeproof and surjectionproof
2020-12-03 15:35:50 +00:00
Tim Ruffing
329a2e0a3f
sage: Add script for generating scalar_split_lambda constants
2020-12-03 11:56:09 +01:00
Jonas Nick
8f0c6f1545
Merge #851 : make test count iteration configurable by environment variable
...
f4fa8d226a95e42b252c07edb425c446370e01c0 forbid a test iteration of 0 or less (Andrew Poelstra)
0ce45548813709d828cb3abcc7db4c9ce6e26907 make test count iteration configurable by environment variable (Andrew Poelstra)
Pull request description:
ACKs for top commit:
jonasnick:
ACK f4fa8d226a95e42b252c07edb425c446370e01c0
real-or-random:
ACK f4fa8d226a95e42b252c07edb425c446370e01c0
Tree-SHA512: 087771402c8e9536c07446baa7d02da5104d2b691f40c1dd04737329534422d895d3b692f485990d5791af8ccc124305b4f8b19be75e27b6b04cfb2337b28beb
2020-12-01 08:31:13 +00:00
Andrew Poelstra
f4fa8d226a
forbid a test iteration of 0 or less
2020-11-30 18:12:31 +00:00
Andrew Poelstra
ff4714e641
Merge pull request #105 from jonasnick/update-musig
...
MuSig state machine simplifictions, API improvements and taproot tweaking
2020-11-30 16:11:34 +00:00
Jonas Nick
3fb4d6db9c
travis: run musig test whenever schnorrsig tests are run
...
Previously the musig module was not tested under valgrind and not with
sanitizers.
2020-11-30 15:40:09 +00:00
Jonas Nick
b9d91b3ecb
musig: add pubkey_tweak_add function to allow taproot tweaking
2020-11-30 15:40:09 +00:00
Andrew Poelstra
0d71b6c61f
Merge pull request #112 from jgriffiths/missed_rename
...
Update renamed decl missed in e0ced690cff035b61763686cb69b7d06571e23e2
2020-11-27 21:41:08 +00:00
Jon Griffiths
4721bec0ef
Update renamed decl missed in e0ced690cff035b61763686cb69b7d06571e23e2
2020-11-27 13:40:50 +13:00
Tim Ruffing
f554dfc708
sage: Reorganize files
...
* Move curve parameters to separate file
* Rename main prover script for clarity
2020-11-25 13:50:40 +01:00
Andrew Poelstra
ebf57dc2f5
Merge pull request #107 from thomaseizinger/secp256k1-zkp
...
Remove unused context initializer functions
2020-11-24 02:17:54 +00:00
Thomas Eizinger
4d20713425
Remove unused context initializer functions
...
Fixes #15 .
2020-11-24 10:43:28 +11:00
Jonas Nick
3a106966aa
Merge #849 : Convert Sage code to Python 3 (as used by Sage >= 9)
...
13c88efed0005eb6745a222963ee74564054eafb Convert Sage code to Python 3 (as used by Sage >= 9) (Frédéric Chapoton)
Pull request description:
ACKs for top commit:
jonasnick:
ACK 13c88efed0005eb6745a222963ee74564054eafb
Tree-SHA512: 6b8a32c35554b7e881841c17fe21323035014d25003f14e399f03ec017ea1bae1c68eee18a4d0315fc0f3b40d8252b5c8790f6c355d7d074a8ebc5e1ca832795
2020-11-23 20:15:25 +00:00
Frédéric Chapoton
13c88efed0
Convert Sage code to Python 3 (as used by Sage >= 9)
...
Co-authored-by: Tim Ruffing <crypto@timruffing.de>
2020-11-23 15:56:22 +01:00
Andrew Poelstra
0ce4554881
make test count iteration configurable by environment variable
2020-11-23 01:05:31 +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
73792e4a27
musig: represent a combined_nonce as an xonly_pubkey
2020-11-13 16:05:36 +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
Andrew Poelstra
6370bdd537
Merge pull request #104 from jonasnick/temp-merge-835
...
Upstream PRs #812 #814 #782 #819 #813 #808 #818 #821 #827 #830 #809 #841 #838 #840 #839 #835
2020-11-09 21:59:22 +00:00
Jonas Nick
e0ced690cf
Rename rands64 to testrandi64
...
This is to make it consistent with upstream changes.
2020-11-05 22:07:30 +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
81052ca411
Merge #103 : Merge upstream schnorrsig PR
...
96b9236c425125f348c15b6629b3a73c8a3062f5 re-enable musig module (Andrew Poelstra)
23900a0d86730f719c52aebba41a1c1cdb9288bd Fix the MuSig module after integrating bip-schnorr updates (Jonas Nick)
f431b3f28ac95a3645ad5a6dc96b878fa30a1de3 valgrind_ctime_test: Add schnorrsig_sign (Jonas Nick)
16ffa9d97cef93f49544b016339c107882f9a1c3 schnorrsig: Add taproot test case (Jonas Nick)
8dfd53ee3fa059562483d1867815f78b9e00d947 schnorrsig: Add benchmark for sign and verify (Jonas Nick)
4e43520026f5bcd182d21f0759bac159ef47bb62 schnorrsig: Add BIP-340 compatible signing and verification (Jonas Nick)
7332d2db6b62fda851f9ed8adbfda187a875b84e schnorrsig: Add BIP-340 nonce function (Jonas Nick)
7a703fd97db0161bae07ef84513ddde6e0d27353 schnorrsig: Init empty experimental module (Jonas Nick)
eabd9bc46a31c0da6db6d88840eadbe9006447b1 Allow initializing tagged sha256 (Jonas Nick)
6fcb5b845d2832ce019d60507033f74426290768 extrakeys: Add keypair_xonly_tweak_add (Jonas Nick)
58254463f9a2e96d893157a341c9953c440fdf60 extrakeys: Add keypair struct with create, pub and pub_xonly (Jonas Nick)
f0010349b876bc6b3f0a6ec6c8bad0b12ca17b51 Separate helper functions for pubkey_create and seckey_tweak_add (Jonas Nick)
910d9c284c33b77774a9316d4524f313357d441c extrakeys: Add xonly_pubkey_tweak_add & xonly_pubkey_tweak_add_test (Jonas Nick)
176bfb1110147b5dca1834ea071acc846fb1cab3 Separate helper function for ec_pubkey_tweak_add (Jonas Nick)
4cd2ee474d178bd1b5602486104db346a7562c67 extrakeys: Add xonly_pubkey with serialize, parse and from_pubkey (Jonas Nick)
47e6618e11813cfabe91f0909ca031f960cb7dd4 extrakeys: Init empty experimental module (Jonas Nick)
3e08b02e2a78f2a1fc457efab665db8ab8085373 Make the secp256k1_declassify argument constant (Jonas Nick)
a11250330b24b3dffdf11d2de5d496397b4e4410 (actually) remove schnorrsig module (Andrew Poelstra)
bac746c55e72abc1cc1ba1e8e6fabb2fea503cfe (temporarily) disable musig module (Andrew Poelstra)
Pull request description:
ACKs for top commit:
jonasnick:
ACK 96b9236c425125f348c15b6629b3a73c8a3062f5
Tree-SHA512: 6801f3b64a0f9b7ac39dec25c2f35793d66483b1e07678521ca82df1b978303d4b3c4693b8d34b2148840b551a4bc530a4e0e726848a6f8fb87bec3eca03d5e6
2020-11-05 08:56:00 +00:00
Pieter Wuille
9e5939d284
Merge #835 : Don't use reserved identifiers memczero and benchmark_verify_t
...
1f4dd0383807bfb7fef884601357b4c629dfb566 Typedef (u)int128_t only when they're not provided by the compiler (Tim Ruffing)
e89278f211a526062745c391d48a7baf782b4b2b Don't use reserved identifiers memczero and benchmark_verify_t (Tim Ruffing)
Pull request description:
As identified in #829 and #833 . Fixes #829 .
Since we touch this anyway, this commit additionally makes the
identifiers in the benchmark files a little bit more consistent.
This is necessary before we can merge #833 . I preferred a separate PR because it makes it easier to see the results of Travis in #833 .
ACKs for top commit:
sipa:
utACK 1f4dd0383807bfb7fef884601357b4c629dfb566
jonasnick:
ACK 1f4dd0383807bfb7fef884601357b4c629dfb566
Tree-SHA512: c0ec92798f3c94f3ef6ac69b3f0f39a39257a32be9d9a068832cece1ebe64c89848b70e44652fc397004b8b240883ac4bc0c8f95abbe4ba4b028de120e6734bf
2020-11-04 15:29:25 -08:00
Andrew Poelstra
96b9236c42
re-enable musig module
2020-11-04 21:47:09 +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
Andrew Poelstra
005fe79262
Merge commit '8ab24e8d' into tmp
2020-11-04 21:46:54 +00:00