ZenGo-X / multi-party-ecdsa

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

Added a check for the length of PDLwSlackProof vector. #163

Closed DmytroTym closed 2 years ago

DmytroTym commented 2 years ago

Hey, @MatanHamilis! Sorry for taking so long to write two lines of code. Quite frankly, I just forgot about this. I think there are no more places in the code where the length check needs to be performed (in keygen round 3 and sign round 2, P2P container is used where parties need to send a list of messages). PS. I only added an assert_eq, without returning the vector of misbehaving parties. When implementing identifiable aborts, this should be changed. Or I can do it now.

MatanHamilis commented 2 years ago

Hey, no worries! I've been also quite overloaded in the past few days.

This looks quite good! It is totally up to you, do you think you would be able to add the code to identify the misbehaving parties?

DmytroTym commented 2 years ago

Sure, it's easy. I'll add it tomorrow.

DmytroTym commented 2 years ago

I actually moved the check inside the phase5_verify_pdl method since it is where the validity of the proofs is verified and blame assigned. IMO, it's cleaner and more intuitive this way. Still, note that in round 5 we just panic whenever an error is returned from the phase5_verify_pdl method. This specific blame is, again, easy to add (though IMO implementing blame exhaustively would require a lot of effort).

DmytroTym commented 2 years ago

Hey Matan!

Could we merge the PR when you'll have the time?

On Sat, Jan 29, 2022 at 9:50 PM Matan Hamilis @.***> wrote:

Hey, no worries! I've been also quite overloaded in the past few days.

This looks quite good! It is totally up to you, do you think you would be able to add the code to identify the misbehaving parties?

— Reply to this email directly, view it on GitHub https://github.com/ZenGo-X/multi-party-ecdsa/pull/163#issuecomment-1024975741, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFMX46ROV27RPC2AE24WCOTUYRAJPANCNFSM5MWWDULQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you authored the thread.Message ID: @.***>

MatanHamilis commented 2 years ago

Forgot to look into this, thanks for reminding!