boltlabs-inc / tss-ecdsa

An implementation of a threshold ECDSA signature scheme
Other
11 stars 5 forks source link

Add constructor to `ParticipantIdentifier` #528

Closed gatoWololo closed 3 months ago

gatoWololo commented 4 months ago

Our ParticipantIdentifier type currently only has one constructor fn random<R: RngCore + CryptoRng>(rng: &mut R) -> Self which allows us to generate a new ID from a secure RNG seed.

There is currently no was to create an ID from a number (u128). We must be able to assign known IDs to certain MPC nodes (see #524) so having this constructor would be very convenient. Note that ParticipantIdentifier implements the Serialize and Deserialize traits, so it is already possible to create ParticipantIdentifier from string literals: "id":177213907645657964211728100773878933118.

So this should not introduce any new security concerns.