ZenGo-X / multi-party-ecdsa

Rust implementation of {t,n}-threshold ECDSA (elliptic curve digital signature algorithm).
GNU General Public License v3.0
975 stars 308 forks source link

InvalidPublicKey during signature generation #89

Open k1rill-fedoseev opened 4 years ago

k1rill-fedoseev commented 4 years ago

Hi. I am using 0.2.8 version of multi-party-ecdsa. In particular, I have used {1,3} party scheme. I have recently faced with the following error during signature generation process:

DEBUG: number: 1, uuid: "0x2c658b237993db261cb073e6d9d985ea0383441380cc1fd47f55993e2d35ef18"
DEBUG: ["round0"] party 2 => party 1
DEBUG: ["round1"] party 2 => party 1
DEBUG: ["round2"] party 2 => party 1
DEBUG: ["round3"] party 2 => party 1
DEBUG: ["round4"] party 2 => party 1
DEBUG: ["round5"] party 2 => party 1
DEBUG: ["round6"] party 2 => party 1
DEBUG: ["round7"] party 2 => party 1
DEBUG: ["round8"] party 2 => party 1
DEBUG: ["round9"] party 2 => party 1
DEBUG: party 1 Output Signature: 

R: SecretKey(782b3aef10b775721336204d593683bdf2bd57b2cbd43e7e05073f3db5507dbb)
s: SecretKey(28c35476586b15d1dba7ab8c7cef8a1ab6c333cbf8a3aae06df7d3edb3aad1f9) 

DEBUG: thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: InvalidPublicKey', src/libcore/result.rs:1165:5
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace.

Signatures generation was restarted several times, but this did not help, the same error appeared every time. Unfortunately, I was not able to reproduce this issue with more verbose logging.

omershlo commented 4 years ago

Hi @k1rill-fedoseev ,

1) Is this error reproduces with other versions? 2) what exactly are you running ?

k1rill-fedoseev commented 4 years ago
  1. I did not get this error previously, while using other versions, and I didn't get it when using the 0.2.8 for a long time as well.
  2. I am running a slightly modified version from my fork of this repo (no changes related to protocol itself). In my environment, there are 3 parties, they generated keys successfully as usual (using provided keygen protocol). Then they tried to sign some transaction hash, using ./gg18_sign_client url /keys/keys2.store 2d...2d on 2 of three parties. As shown in logs, parties have generated a signature, but for some reason check_sig has failed.
omershlo commented 4 years ago

Can you work with v0.2.9?

k1rill-fedoseev commented 4 years ago

Sure, I can.

omershlo commented 4 years ago

ok, I have a suspicious to why you got this error. It should not happen in v0.2.9. Let me know if you still get it.