Allow to pass pre-generated safe prime numbers to Credential Definition creation #143
Allow to pass pre-generated safe prime numbers to Credential Definition creation #143
Conversation
- add call pattern to allow creating credential primary keys with existing prime numbers - allows to decouple prime number generation from actual credential definition creation for performance optimization - add test for creating cred def with existing primes Signed-off-by: wulfraem <wulfraem@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR. LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR concerns me deeply. It goes against the stated ideals of simple usability, and allows any numbers to be submitted as "primes," which could be a massive footgun.
We need to discuss this much more before merging this.
@@ -780,7 +822,33 @@ impl Issuer { | |||
CredentialPrimaryPublicKeyMetadata, | |||
)> { | |||
trace!( | |||
"Issuer::_new_credential_primary_keys: >>> credential_schema: {:?}", | |||
"Issuer::_new_credential_primary_keys_with_primes: >>> credential_schema: {:?}", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"Issuer::_new_credential_primary_keys_with_primes: >>> credential_schema: {:?}", | |
"Issuer::_new_credential_primary_keys: >>> credential_schema: {:?}", |
@wulfraem Here are the key concerns around your proposed changes:
In greater detail:
Please respond with any questions you may have. We also welcome you to join our biweekly call to discuss this PR with the group directly. You should be able to find meeting time and connection information on the hyperledger calendar |
@brentzundel are there any updates to this PR? Any plans to merge it soon? |
@Alexis-Falquier I have not heard a response from the OP about our concerns. Until those are addressed, I do not support merging this PR. |
This PR has been dormant for over a year, with no response from @wulfraem |
To allow speeding up credential definition creation we wanted to create the safe prime numbers beforehand with
ursa::helpers::generate_safe_prime
and hold onto them until the actual credential definition is created.In our use case we have to create multiple credential definitions at a time and having a bunch of safe primes ready for this improves performance of this a lot. :)