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

Intermittent errors at GG20 Sign Stage 6 #111

Closed jameshiester closed 3 years ago

jameshiester commented 3 years ago

I am trying to run v4.3 using 3 shares, 2 threshold. I've wrapped the functions in node using neon. Sign runs ok around 60% of the time, but I often see the following error: error_type: "phase5 R_dash_sum check failed Err(Phase5BadSum)". I'm not sure is this is due to the way I have wrapped the functions, or if this is an expected behavior from the library if a poor K value is chosen or some known issue with the underlying library?

omershlo commented 3 years ago

Hi @jameshiester ! the signing should work 100% of the time. There is no known issue but I will look into this. what other errors do you get ? Is it possible that your wrapped functions caused it? Do you see the same error when testing the code directly without the wrapper?

jameshiester commented 3 years ago

That's the only error I get. Can I assume the issue occurs between stage 5 signing and stage 6, or is a state possible where stage 5 succeeds yet the data is in a state such that it will fail upon reaching stage 6?

omershlo commented 3 years ago

both options are possible. we run a statistical test (run the same test 100 times) and all passed. Our conclusion so far is that the issue is most likely in the wrapper