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 Support for PKCS8 DER/PEM writing #1695

Open
mvgalen opened this issue Jun 6, 2018 · 3 comments
Open

Add Support for PKCS8 DER/PEM writing #1695

mvgalen opened this issue Jun 6, 2018 · 3 comments
Labels
component-crypto Crypto primitives and low-level interfaces enhancement historical-reviewed Reviewed & agreed to keep legacy PR/issue

Comments

@mvgalen
Copy link

mvgalen commented Jun 6, 2018

Enhancement

Currently mbedtls can not write private keys in PKCS8 format, although it is able to parse PKCS8 format.

  • Since PKCS8 also supports not-yet existing key types since it is extendable it would be a future proof format for key exchange.
  • Another reason would be that some TLS implementations do not support PKCS1 for private key exchange (like JAVA).

Adding support for PKCS8 PEM/DER writing should be relatively simple since it is only an added envelope.

@eliburke
Copy link

I'll second this request! I just had to learn enough ASN1 to extract the public and private from the SEC1 output of mbedtls_pk_write_key_der() and re-write it as PKCS8 (in Swift.. so not a lot of prior art). My brain is still hurting.

@mvgalen
Copy link
Author

mvgalen commented Jun 20, 2018

I just put my implementation in a pull request: #1759
The pull request is against development, but it should also apply to 2.8.0, which I used for development/testing.

@RonEld RonEld added fix available component-crypto Crypto primitives and low-level interfaces labels Feb 14, 2019
@RonEld
Copy link
Contributor

RonEld commented Feb 14, 2019

PR fixing this issue was opened in #1759 , superseded by #2413

@tom-daubney-arm tom-daubney-arm added historical-reviewing Currently reviewing (for legacy PR/issues) historical-reviewed Reviewed & agreed to keep legacy PR/issue and removed historical-reviewing Currently reviewing (for legacy PR/issues) labels Nov 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component-crypto Crypto primitives and low-level interfaces enhancement historical-reviewed Reviewed & agreed to keep legacy PR/issue
Projects
None yet
Development

No branches or pull requests

5 participants