Commit Graph

363 Commits

Author SHA1 Message Date
creamwhip
8488daf9f1 upgrade to latest github.com/Roasbeef/btcd BIP340 branch, upgrade deps 2022-01-29 15:37:05 +08:00
Gustavo Frederico
2862aa25d3 Minor fixes to unit tests. No functional change to protocols. 2022-01-27 16:36:48 -05:00
Gustavo Frederico
2be88a65d2 Removing unused import in test util file. 2022-01-27 14:05:57 -05:00
Gustavo Frederico
97fda5fdb9 Hard-coded constants instead of fixture files for certain unit tests. No functional change to protocol. 2022-01-27 13:59:56 -05:00
Gustavo Frederico
0a3f5fdece MTA unit tests: hard-coded constants instead of fixture files. 2022-01-27 11:57:11 -05:00
Gustavo Frederico
21ad11806d Various changes matching an external repo. Adding elliptic curve as parameter to functions. Updating the protobuf import package. 2022-01-26 16:15:36 -05:00
Gustavo Frederico
ba2ecfaba6 Minor change: ECDSA signing task name. No functional change. 2022-01-19 20:11:26 -05:00
Gustavo Frederico
581c172aae Refactoring of Schnorr verification. No functional change. 2022-01-16 11:49:36 -05:00
Gustavo Frederico
6db6d1e4c7 EdDSA with the secp256k1 elliptic curve for Schnorr signatures and Taproot. Work in Progress. 2021-12-21 13:19:44 -05:00
Gustavo Frederico
1e02560e7e Merging the branch that has CGGMP21 Oct changes onto the master branch. Resolving conflicts (listed below). In general, file versions of CGGMP21 Oct were chosen and security patches or small recent improvements from the master branch were copied over.
Merge branch 'master' into feature/cggmp21oct-tss-lib-tmp-merge

# Conflicts:
#	.github/workflows/test.yml
#	Makefile
#	README.md
#	crypto/ckd/child_key_derivation.go
#	crypto/ecpoint.go
#	crypto/mta/proofs.go
#	crypto/mta/range_proof.go
#	crypto/mta/share_protocol.go
#	crypto/mta/share_protocol_test.go
#	crypto/paillier/paillier.go
#	crypto/vss/feldman_vss.go
#	ecdsa/keygen/ecdsa-keygen.pb.go
#	ecdsa/keygen/local_party.go
#	ecdsa/keygen/local_party_test.go
#	ecdsa/keygen/messages.go
#	ecdsa/keygen/prepare.go
#	ecdsa/keygen/round_1.go
#	ecdsa/keygen/round_2.go
#	ecdsa/keygen/round_3.go
#	ecdsa/keygen/round_4.go
#	ecdsa/keygen/save_data.go
#	ecdsa/resharing/ecdsa-resharing.pb.go
#	ecdsa/resharing/local_party_test.go
#	ecdsa/resharing/messages.go
#	ecdsa/resharing/round_1_old_step_1.go
#	ecdsa/resharing/round_4_new_step_2.go
#	ecdsa/signing/ecdsa-signing.pb.go
#	ecdsa/signing/finalize.go
#	ecdsa/signing/key_derivation_util.go
#	ecdsa/signing/local_party.go
#	ecdsa/signing/local_party_test.go
#	ecdsa/signing/messages.go
#	ecdsa/signing/prepare.go
#	ecdsa/signing/round_1.go
#	ecdsa/signing/round_2.go
#	ecdsa/signing/round_3.go
#	ecdsa/signing/round_4.go
#	ecdsa/signing/round_5.go
#	ecdsa/signing/round_6.go
#	ecdsa/signing/round_7.go
#	ecdsa/signing/rounds.go
#	eddsa/keygen/eddsa-keygen.pb.go
#	eddsa/keygen/local_party.go
#	eddsa/keygen/local_party_test.go
#	eddsa/keygen/messages.go
#	eddsa/keygen/round_1.go
#	eddsa/keygen/round_2.go
#	eddsa/keygen/round_3.go
#	eddsa/keygen/save_data.go
#	eddsa/keygen/test_utils.go
#	eddsa/resharing/eddsa-resharing.pb.go
#	eddsa/resharing/local_party.go
#	eddsa/resharing/local_party_test.go
#	eddsa/resharing/messages.go
#	eddsa/resharing/round_1_old_step_1.go
#	eddsa/resharing/round_4_new_step_2.go
#	eddsa/signing/eddsa-signing.pb.go
#	eddsa/signing/finalize.go
#	eddsa/signing/local_party.go
#	eddsa/signing/local_party_test.go
#	eddsa/signing/messages.go
#	eddsa/signing/prepare.go
#	eddsa/signing/round_1.go
#	eddsa/signing/round_2.go
#	eddsa/signing/round_3.go
#	eddsa/signing/rounds.go
#	eddsa/signing/utils.go
#	go.mod
#	go.sum
#	protob/ecdsa-keygen.proto
#	protob/ecdsa-resharing.proto
#	protob/ecdsa-signing.proto
#	protob/eddsa-keygen.proto
#	protob/eddsa-resharing.proto
#	protob/eddsa-signing.proto
#	protob/message.proto
#	protob/signature.proto
#	test/_ecdsa_fixtures/keygen_data_0.json
#	test/_ecdsa_fixtures/keygen_data_1.json
#	test/_ecdsa_fixtures/keygen_data_2.json
#	test/_ecdsa_fixtures/keygen_data_3.json
#	test/_ecdsa_fixtures/keygen_data_4.json
#	test/_eddsa_fixtures/keygen_data_0.json
#	test/_eddsa_fixtures/keygen_data_1.json
#	test/_eddsa_fixtures/keygen_data_2.json
#	test/_eddsa_fixtures/keygen_data_3.json
#	test/_eddsa_fixtures/keygen_data_4.json
#	test/config.go
#	tss/message.pb.go
#	tss/params.go
#	tss/party.go
#	tss/wire.go
2021-12-17 16:03:49 -05:00
Gustavo Frederico
c58e4b5ad1 Additional check when Ks mismatch in savedata and sortedID 2021-12-14 07:54:27 +00:00
Gustavo Frederico
bd32a619a8 Signing - prepare: check of user id equality modulo curve order. 2021-12-13 15:38:09 +00:00
Gustavo Frederico
3a9d45177e Fixing issue in the Feldman VSS code. Checking indexes modulo the curve order, so as not to leak evaluation at point 0. 2021-12-13 15:38:09 +00:00
Gustavo Frederico
4cd8e37b89 Signing - prepare: check of user id equality modulo curve order. 2021-12-09 11:59:23 +08:00
creamwhip
b6e761a803 go fmt 2021-12-07 22:36:11 +08:00
Gustavo Frederico
17772d0e9c Changing the validation of the mod zkp. Changing back validation of NonEmptyBytes. Adding back the TestBadMessageCulprits unit test. 2021-12-01 11:22:53 -05:00
Gustavo Frederico
8b376e72fc go fmt only for files touched in comparison with forked branch (cggmp21-tss-lib). No functional change in this commit. 2021-11-30 21:37:24 -05:00
Gustavo Frederico
eea5a431bb Changing the abort identification unit test to depict fairly the behaviour of the innocent party. This commit removes lines from the unit test that changed the internal storage of round 1 and round 3 data (for the victim party). The culprit is identified in round 4 in this commit. The current change is only to the unit test. That is, there is no functional change to the protocol. 2021-11-29 14:52:12 -05:00
Gustavo Frederico
928b825cbe Fixing casting error in TestAbortIdentification. 2021-11-29 06:53:08 -05:00
Gustavo Frederico
5fa29d51f1 Reverting change to BaseUpdate. 2021-11-25 18:40:26 -05:00
Gustavo Frederico
8dd9614fdc Change to Update in sign_4 (round 4) of signing, so as to avoid a deadlock. Change to tss.BaseUpdate removing recursion. 2021-11-24 23:07:09 -05:00
creamwhip
697e6ece3c fix calls to BaseUpdate 2021-11-23 19:38:14 +08:00
Gustavo Frederico
974d8cfd1a Removing extra logging. No funcional change. 2021-11-22 19:17:13 -05:00
Gustavo Frederico
f81d9700a2 Adding identification of abort for ECDSA signing. 2021-11-22 19:08:19 -05:00
Gustavo Frederico
36573fc6ee Initial updates of the October version of the CGGMP21 paper. Work in progress. 2021-11-15 21:38:27 -05:00
Gustavo Frederico
701d83177a Paillier check. Mta and Dec unit tests. 2021-11-08 23:56:44 -05:00
creamwhip
52732f1fe5 remove a random println 2021-10-29 17:24:20 +08:00
Gustavo Frederico
ac1d2cc9a0 Identification of aborts with unit test. 2021-10-26 23:39:42 -04:00
Gustavo Frederico
b961e02c70 Renaming variables to match the paper. No functional change in this commit. 2021-10-26 12:12:10 -04:00
Gustavo Frederico
5c51a3aca7 Minor change: adding error handling in round 1 (keygen). 2021-10-18 18:39:44 -04:00
Gustavo Frederico
4397af0043 keygen: adding a Schnorr proof in round 1. Adding missing ridi and rid. Adding Xi and Ai to the hashes and messages. Adding Schnorr zkp in round 3. Adding proof verifications in round 4. 2021-10-18 18:39:19 -04:00
creamwhip
2abb1033ec ecdsa: some cleanup, assign culprits 2021-10-18 15:01:22 +08:00
creamwhip
ed06542187 ecdsa/keygen: ensure paillier modulus == paillierModulusLen
In our implementation when generating safe primes, we also need the generated value to start with "11". So the factor of a paillier modulus >= 2^1023+2^1022. While (2^1023+2^1022)*(2^1023+2^1022)>2^2047, the result paillier modulus should be exactly 2048 bit.
2021-10-18 14:56:47 +08:00
creamwhip
d70c605c98 ecdsa/keygen: ensure paillier modulus == paillierModulusLen 2021-10-18 14:53:04 +08:00
Gustavo Frederico
cf960baa49 Check the Paillier modulus bit length in round 2 of keygen, ensuring it is not too small. That would be a security threat. 2021-10-18 14:53:04 +08:00
Gustavo Frederico
df096b7875 Using make to reset certain variables after use, instead of setting to nil, considering that update may still be called. Adding a return function to the BaseUpdate, matching the master commit as of today. Without the function and the recursive call, the resharing unit test does not proceed after round 3. 2021-10-05 19:40:31 -04:00
creamwhip
45f504e4a9 regen protobufs for protoc-gen-go v1.27.1 2021-09-30 18:09:48 +08:00
creamwhip
33cf57dddc refactor redundant safe prime in pre params data 2021-09-30 18:09:47 +08:00
ycen
ac37ece47f ecdsa-keygen parallization and code clean 2021-09-30 18:00:10 +08:00
ycen
06fd3376c8 Fix ecdsa/keygen E2E test not run 2021-09-27 15:04:43 +08:00
ycen
a01df8351c Fix ecdsa-keygen test 2021-09-23 20:47:45 +08:00
ycen
1ff2f61744 Update ecdsa-keygen protol 2021-09-23 13:49:11 +08:00
ycen
c6b18b0af9 Add ZK proof prm and sch
with related change in ecdsa/keygen
2021-09-16 14:33:56 +08:00
ycen
aa596c3c2f Add ZKP needed form identification 2021-09-13 18:21:51 +08:00
ycen
bca3d16910 Parse received message and store parsed variable
Will not store raw messages received
2021-09-10 12:58:17 +08:00
ycen
37236798d1 Modified names in message 2021-09-09 20:15:20 +08:00
ycen
07d80fc111 Rename round name to presign/sign 2021-09-09 20:09:39 +08:00
ycen
18a04094ef Parallized processing proof generation and verify 2021-09-09 16:06:54 +08:00
Patrick Cen
7f81429cfe Merge commit '3e4ded5feaf5a14f80a87e53bf27646851c8dd57' into internal-mobile-wrapper 2021-09-09 11:41:01 +08:00
Patrick Cen
97d9fe472b CGGMP protocol update.
One round signing and thre round presign protocol according to the CGGMP
paper.
2021-09-09 00:53:33 +08:00