-
Notifications
You must be signed in to change notification settings - Fork 18
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 import-key subcommand #75
Comments
Hi @miroheikkonenabb, thanks for the request. We're happy to get this integrated into the tool and we'd be grateful if you contribute it - we can offer guidance for navigating the code and feedback on the PR. In terms of interface design, we'll need to settle a few questions before comitting to an implementation:
|
HI! We are not using RSA so it's enough for us to get import-ecc-key subcommand which has support for SECP256-R1 EccKeyPair. As a parameter PEM private key with PKCS#8 encryption would be used. Export-public-key and create-csr create PEM so I'm guessing it should have all the necessary information. As a suggestion: there could be flags the same way that create-key commands have: "--for-crypt" and "--for-signing" |
I think that ECC keys are universally used for signing, so we could probably default to that and not need a switch. (RSA keys default to encryption, and support "--for-signing" to override the default. The create-ecc-key function always creates a signing key, and I think import-ecc-key should probably do the same. PEM PKCS#8 as input makes sense, although we might want to think ahead to how the CLI commands should process multiple input types. At the moment, export-public-key produces PEM PKCS#8, but that's because we see that as being the most useful default, and the tool tries to always do the most useful thing with minimal typing. We could add switches later to override and output different formats, if there is a need for that. So we want to make sure that any new import commands have some kind of protocol associated with them so that we can be more flexible on file formats in the future, possibly accepting DER for instance. I would suggest that we just assume PEM PKCS#8 for now. Future evolution can either be done by adding a switch parameter or by auto-detecting the format if that's feasible and reliable. @miroheikkonenabb would you be interested in contributing this as a PR? We would love to work on this with you collaboratively, and we can provide as much guidance and help as needed. We are actively seeking to grow the Parsec community and have PRs coming in from a diverse set of participants and organisations. This helps with the health of a project from a CNCF growth standpoint as well. |
I'm currently adding an |
It should be possible to import keys trough Parsec-tool with an import-key command as that functionality exists in Parsec. This should support at least Mbed-crypto. It shoud take the key or key pair we want to import as an input and at least EccKeyPair should be supported.
The text was updated successfully, but these errors were encountered: