-
Notifications
You must be signed in to change notification settings - Fork 167
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
Create API to get curve parameters on a group #425
Comments
Upon thought perhaps this should be a few different calls:
|
This sounds like just OpenSSL's implementation detail. #432 doesn't include this and I feel this could be skipped.
Should it simply return the text representation of the NID (in other words, "prime-field" or "characteristic-two-field" - as returned by In the upcoming OpenSSL 3.0, It's not ideal if we have to maintain code like:
Why should it be an Array? Hash seems to be a better fit. If a new Group object with the same parameters is required, one can simply use Also perhaps it could be named |
I did it this way to match
Again, done to match
Wanted to avoid conflict with other params concepts like rails |
I understand. I think we should rather have The
I don't get why one would want to pass the returned value to
OpenSSL::PKey::{RSA,DSA,DH} have #params method to dump the content as a Hash, so I'm not worried about that. |
What about taking an Int and defining const values for At least that way if there is a third value some time if the feature clients can just have their own const.
Yeah - a hash is a better call here, will make changes. Not like it cant be called with |
Also looks like For prior versions will have to check using Will implement with a |
Actually, OpenSSL looks like going towards getting rid of NID in public API and has started using I don't think |
You are able to call
new(:GFp, p, a, b)
but are not able to pull those values later.This becomes a problem when you want to for instance open a curve by name and the the value for field for modular operations. I think we should support a method like
OpenSSL::PKey::EC::Group#curve_params => [ :GFp, p, a, b ]
This will require doing a little more work because that getter will first need to query the
EC_GROUP_method_of
for the group, then if it is GFp or GF2m pull the values of the field, a, b, etc as needed for the curve type. Since creating a new curve this is supported it can be a get only attribute.The text was updated successfully, but these errors were encountered: