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

Feature/export private key as jwk #528

Merged
merged 16 commits into from
Jan 3, 2025

Conversation

tenpertur
Copy link
Contributor

KSE now is able to export private keys as JWK.
Existing code for exporting public keys has been simplified and refactored.

Add translations and dialog box radio button
for exporting privaye key as JWK
Existing selector of the private key format needs
to handle JWK. JWK supports aside of RSA and EdDSA
subset of EC curves. Passing just KeyPairType is not
sufficient, so this dialog now uses PrivateKey instance
to decide which output formats should be enabled
This is part of (kaikramer#438)
Reuse existing KSE utility code in JWK public key exporter.
Extract JWK common code that is shared by the public and
private key exporters

This is part of (kaikramer#438)
Export instances of RSAPrivateCrtKey as JWK

This is part of (kaikramer#438)
Export instances of ECPrivateKey as JWK

This is part of (kaikramer#438)
provide static method JwkPublicKeyExporter.isPublicKeyTypeExportable
which uses existing KSE functionality to check if key type
can be exported to Jwk, without creating instance of the JwkPublicKeyExporter class
@kaikramer
Copy link
Owner

Nice PR, thanks a lot!

@kaikramer kaikramer merged commit de26c85 into kaikramer:main Jan 3, 2025
4 checks passed
@tenpertur tenpertur deleted the feature/export_private_key_as_jwk branch January 3, 2025 20:58
@tenpertur
Copy link
Contributor Author

always glad to help!
do you think we can close #438? or there is still something to do here?

@kaikramer
Copy link
Owner

always glad to help! do you think we can close #438? or there is still something to do here?

I haven't fully tested it, but it seems complete for me. In general I like to keep the issues open until the actual release happens. So they are easier to find if someone else wants the same feature.

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.

2 participants