Trust-Machines / wsts

Weighted Schnorr Threshold Signatures
Apache License 2.0
27 stars 12 forks source link

MI-06 Inconsistent Configuration #78

Open xoloki opened 5 months ago

xoloki commented 5 months ago

The Config class in coordinator/mod.rs method new() includes the following line signer_public_keys: HashMap<u32, Point>, However, later the in net.rs the object public keys is different:

pub struct PublicKeys {
   /// signer_id -> public key
   pub signers: HashMap<u32, ecdsa::PublicKey>,
   /// key_id -> public key
   pub key_ids: HashMap<u32, ecdsa::PublicKey>,
}

This inconsistency is not caught in tests (for example, of the Packet method validate() which would catch this error) but this could lead to problems for typical use cases.