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

Return an Idemix Enrollment as a Serialized String #222

Closed

Conversation

KarthikKavinA
Copy link

Added an API to return an Identity Mixer Enrollment as a Serialized
String

Signed-off-by: Kavin a.kavin24@gmail.com

Added an API to return an Identity Mixer Enrollment as a Serialized
String

Signed-off-by: Kavin <a.kavin24@gmail.com>
@KarthikKavinA KarthikKavinA marked this pull request as ready for review August 9, 2022 06:27
@KarthikKavinA KarthikKavinA requested a review from a team as a code owner August 9, 2022 06:27
Copy link
Member

@bestbeforetoday bestbeforetoday left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is not enough implementation here to really know where you are going with this longer term, and no testing.

I think what you're trying to achieve is to be able to convert the Idemix enrollment into some serialized form that you can later deserialize to recreate an Idemix enrollment. I'm not sure if the IdemixEnrollmentSerialized class is really necessary or even helpful for that. A meaningful change really needs to provide the whole round-trip from object to serialized form and back again, along with unit tests.

If that round-tripping really is the objective, possibly it would make more sense to have a serialize method on the IdemixEnrollment that returns some serialized form of the content (which could be something standard like JSON but doesn't need to be specified since the end user isn't intended to parse it), and a factory function to allow an IdemixEnrollment to be recreated from that serialized form? Taking that approach, I would encourage you to include a version number in the serialized data to indicate the serialized format version. If it ever needs to change in the future you can increment the version number, and include logic in the deserialization code to handle both formats.

@@ -1199,6 +1200,106 @@ public Enrollment idemixEnroll(Enrollment enrollment, String mspID) throws Enrol
}
}

/**
* idemixEnrollSerializedStr returns an Identity Mixer Enrollment As a Serialized String, which supports anonymity and unlinkability
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not returning an Idemix enrollment as a serialized string. It's returning an Enrollment interface, which provides only these methods:

public interface Enrollment {
    PrivateKey getKey();
    String getCert();
}

In the returned implementation, both of those methods return null so it is not a useful return value.

@bestbeforetoday
Copy link
Member

This pull request has been open for a long time without any updates to move it towards a successful change, so I am closing.

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

Successfully merging this pull request may close these issues.

None yet

2 participants