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 parsing of ECC key pairs #438

Open
hug-dev opened this issue May 25, 2021 · 1 comment
Open

Add parsing of ECC key pairs #438

hug-dev opened this issue May 25, 2021 · 1 comment
Labels
enhancement New feature or request good first issue Good for newcomers medium Effort label

Comments

@hug-dev
Copy link
Member

hug-dev commented May 25, 2021

Depending on the provider and how they use ECC keys, it might be useful to have a way to parse the ECC key pairs. This is specially useful for the ImportKey/ExportKey operations.

See this comment for details:

For the ECC key pairs, the format is explained here and is the ASN.1 type ECPrivateKey:

   ECPrivateKey ::= SEQUENCE {
     version        INTEGER { ecPrivkeyVer1(1) } (ecPrivkeyVer1),
     privateKey     OCTET STRING,
     parameters [0] ECParameters {{ NamedCurve }} OPTIONAL,
     publicKey  [1] BIT STRING OPTIONAL
   }

We are using the picky crates to do ASN.1 parsing/serialization and before we were also defining our own ASN.1 types, like for RSA keys. See #201 for example.
As an initial step, we should make a PR to add support for ECPrivateKey in picky-asn1-x509 crate.

@hug-dev hug-dev added enhancement New feature or request good first issue Good for newcomers labels May 25, 2021
@hug-dev
Copy link
Member Author

hug-dev commented May 25, 2021

This is also so that we can add an end-to-end test to check that the format of the ECC key exported is correct.

@ionut-arm ionut-arm added the medium Effort label label Jul 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers medium Effort label
Projects
None yet
Development

No branches or pull requests

2 participants