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

ServerIdentity.ID shouldn't rely on String #617

Open
Tracked by #211
ineiti opened this issue Jan 22, 2020 · 0 comments
Open
Tracked by #211

ServerIdentity.ID shouldn't rely on String #617

ineiti opened this issue Jan 22, 2020 · 0 comments
Labels

Comments

@ineiti
Copy link
Member

ineiti commented Jan 22, 2020

In https://github.com/dedis/onet/blob/master/network/struct.go#L175, the ID of ServerIdentity depends on the output of Point.String(), which is bad, because String() is a method for users and is supposed to change.

Fix:

  1. easy: use MarshalBinary and hex.EncodeToString
  2. better: add a RfcMarshaller that is semantically stronger than a MarshalBinary

IMO, 1. is enough, as for me MarshalBinary shouldn't change. But see discussion in #405

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant