axelarnetwork / tofn

A threshold cryptography library in Rust
Apache License 2.0
112 stars 23 forks source link

fix(malicious):self-target #39

Closed sdaveas closed 3 years ago

sdaveas commented 3 years ago

Fixed problems where tofn was crushing when some of the criminals were targeting themselves. The convention I followed is that, in the case of self-targeting, the corruption is skipped and a waning message is printed. This means that now some malicious test cases will actually return a valid signature.

There is an asymmetry on how some behaviours are not affected by self-targeting (namely, FalseAccusations for R3, R4 and R6), even though they accept a victim index. That I can't explain.

sdaveas commented 3 years ago

fixes #37

ggutoski commented 3 years ago

There is an asymmetry on how some behaviours are not affected by self-targeting (namely, FalseAccusations for R3, R4 and R6), even though they accept a victim index. That I can't explain.

False accusation does not rely on the existence of a proof to corrupt. Thus, we should expect no problem even in the case that a participant falsely accuses herself.

sdaveas commented 3 years ago

There is an asymmetry on how some behaviours are not affected by self-targeting (namely, FalseAccusations for R3, R4 and R6), even though they accept a victim index. That I can't explain.

False accusation does not rely on the existence of a proof to corrupt. Thus, we should expect no problem even in the case that a participant falsely accuses herself.

Still some FalseAccusations (R1, R2 and R5) crushed if criminal was the targeted one.

ggutoski commented 3 years ago

Still some FalseAccusations (R1, R2 and R5) crushed if criminal was the targeted one.

Oops. Let me try again: If a fault is claimed (either a real fault or a false accusation) then all parties attempt to check the proof. For rounds where there is no proof-to-self (eg R1, R2, R5) a self-targeting criminal will crash, even in false accusation. For other rounds (R3, R4, R6) this issue does not arise, so false accusation will not crash.