Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add constructor to ParticipantIdentifier #528

Closed
gatoWololo opened this issue Apr 29, 2024 · 0 comments · Fixed by #529
Closed

Add constructor to ParticipantIdentifier #528

gatoWololo opened this issue Apr 29, 2024 · 0 comments · Fixed by #529
Labels
enhancement New feature or request tech-debt Something works but could be better

Comments

@gatoWololo
Copy link

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.

@gatoWololo gatoWololo added enhancement New feature or request tech-debt Something works but could be better labels Apr 29, 2024
gatoWololo added a commit that referenced this issue Apr 29, 2024
gatoWololo added a commit that referenced this issue Apr 29, 2024
gatoWololo added a commit that referenced this issue May 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request tech-debt Something works but could be better
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant