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

Add Elliptic Curve support to PKey #195

Closed
wants to merge 1 commit into from
Closed

Add Elliptic Curve support to PKey #195

wants to merge 1 commit into from

Conversation

mrjefftang
Copy link
Contributor

This is a rewrite of an older PR that adds EC support to PKey to incorporate the inclusion of _EllipticCurve objects.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.05%) to 94.47% when pulling 66f94d5 on mrjefftang:ecpkey into 496f40d on pyca:master.

2 similar comments
@coveralls
Copy link

Coverage Status

Coverage decreased (-0.05%) to 94.47% when pulling 66f94d5 on mrjefftang:ecpkey into 496f40d on pyca:master.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.05%) to 94.47% when pulling 66f94d5 on mrjefftang:ecpkey into 496f40d on pyca:master.

@reaperhulk reaperhulk added this to the 0.16 milestone Apr 14, 2015
Add support for TYPE_EC to PKey
Add tests for TYPE_EC PKey
Add documentation for TYPE_EC PKey
Add ChangeLog entry for TYPE_EC PKey
Pick some curves for the test_regeneration
@coveralls
Copy link

Coverage Status

Coverage decreased (-2.38%) to 92.91% when pulling 7023d7c on mrjefftang:ecpkey into 0145533 on pyca:master.

1 similar comment
@coveralls
Copy link

Coverage Status

Coverage decreased (-2.38%) to 92.91% when pulling 7023d7c on mrjefftang:ecpkey into 0145533 on pyca:master.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.05%) to 95.25% when pulling 7023d7c on mrjefftang:ecpkey into 0145533 on pyca:master.

:param type: The key type (TYPE_RSA or TYPE_DSA)
:param bits: The number of bits
:param type: The key type (TYPE_RSA or TYPE_DSA or TYPE_EC)
:param bits: The number of bits or EllipticCurve
Copy link
Contributor

Choose a reason for hiding this comment

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

If I was specifying a curve, I'm not sure if I would know how I would do it, based on this. If I was using RSA I would specify something like "2048". If I was specifying a curve, I would specify what? "secp384r1"? I'm not sure if I have a better alternative though or a suggestion for where you should take it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I agree, it's not the greatest approach.

The current implementation is used as follows:

curve = OpenSSL.crypto.get_elliptic_curve('secp384r1')
pkey = PKey()
pkey.generate(key, TYPE_EC, curve)

Honestly I think the best approach would be to subclass PKey into RSAPKey, DSAPKey, and ECPKey but that is getting away from the thin abstraction on top of OpenSSL.

@hynek
Copy link
Contributor

hynek commented Dec 19, 2016

I believe this has been fixed via #439. Sorry for the inappropriate process!

@hynek hynek closed this Dec 19, 2016
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 18, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants