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

Making Party1 MasterKey "private" field, visibility public #20

Closed
gbenattar opened this issue May 5, 2019 · 3 comments
Closed

Making Party1 MasterKey "private" field, visibility public #20

gbenattar opened this issue May 5, 2019 · 3 comments

Comments

@gbenattar
Copy link
Contributor

@omershlo can you document?

@gbenattar gbenattar changed the title Making Party1 MasterKey public Making Party1 MasterKey "private" field, visibility public May 5, 2019
gbenattar added a commit that referenced this issue May 5, 2019
@omershlo
Copy link
Contributor

omershlo commented May 5, 2019

Private is a Struct part of the MasterKey Struct that represent the private fields of the master keys. We do not want to expose these fields outside of library that created them and therefore they are private.
We created a set of method calls to manipulate private fields in case some higher level code requires it. This is very specific set of methods (rotate, encrypt etc..) and this is the only API that higher level code can get to private fields where all operations are done locally - private fields remain private and unexposed.
Because the sensitivity of the Private Struct we made it private in KMS Master Key Struct by default, Until some good use case will show that it is needed outside KMS. In that case we decided to switch to pub the Private struct, same as we have done previously with Party2 MasterKey. The specific use case is following a test that show how to use kms. We feel the Private API in multi-party-ecdsa is secure and do not leak private data so we see no problem in switching to pub what should have been pub at the first place.

Having said that, Private is still serialisable which we will be able to eliminate once @gbenattar will solve the Gotham issue ZenGo-X/gotham-city#21

@omershlo
Copy link
Contributor

omershlo commented May 5, 2019

To be accurate: Private is a Party1Private which is a public Struct in multi-party-ecdsa with private elements. private is a field of type Party1Private in KMS. Party1Private defines a set of methods to manipulate it securely and without exposing or leaking private data. private field was set up to be private by default until a use case showed it is needed for a consumer of KMS library.

gbenattar added a commit that referenced this issue May 5, 2019
@gbenattar
Copy link
Contributor Author

Pushed. Resolving.

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

No branches or pull requests

2 participants