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

Document how to get SubjectPublicKey form from SubjectPublicKeyInfo #476

Closed
lawliet89 opened this issue Mar 7, 2017 · 2 comments
Closed

Comments

@lawliet89
Copy link
Contributor

I guess this is similar to #470.

I have computed an EC private key: openssl ecparam -name prime256v1 -genkey -noout -outform der -out ecdsa_private_key.der and the corresponding public key: openssl ec -in ecdsa_private_key.der -inform der -pubout -out ecdsa_public_key.der -outform der.

As far as I can tell, (by converting the DER public key to PEM), the public key from this is in SubjectPublicKeyInfo. I understand that ring works with the "traditional" form (is this PKCS#1?)

Is there any command line tool I could use to perform this conversion? openssl ec does not seem to have the RSAPublicKey_{in|out} analogue.

@lawliet89 lawliet89 changed the title How are EC Public key used in ECDSA signature verification generated? How are EC Public keys used in ECDSA signature verification generated? Mar 7, 2017
@briansmith
Copy link
Owner

I don't know. It's better to ask on openssl-users; see https://www.openssl.org/community/mailinglists.html.

Once #378 is fixed, you'll be able to parse a SubjectPublicKeyInfo in ring to get the raw SubjectPublicKey that sing::signature::verify() uses.

@briansmith briansmith changed the title How are EC Public keys used in ECDSA signature verification generated? Document how to get SubjectPublicKey for from SubjectPublicKeyInfo Mar 7, 2017
@lawliet89 lawliet89 changed the title Document how to get SubjectPublicKey for from SubjectPublicKeyInfo Document how to get SubjectPublicKey form from SubjectPublicKeyInfo Mar 7, 2017
@briansmith
Copy link
Owner

briansmith commented Oct 14, 2023

Closing as a duplicate of #370 (edit: was #378).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants