(Please reply to the full mailing lists)

https://cryptography.io/en/latest/hazmat/primitives/asymmetric/ec/#cryptography.hazmat.primitives.asymmetric.ec.EllipticCurvePublicKey
describes the methods that an EllipticCurvePublicKey has for exporting the
key, either to bytes or ot raw numbers.

Alex

On Thu, Apr 20, 2017 at 9:21 AM, Paul King <p...@grumpypunk.com> wrote:

>
>
> This all looks good, however I still struggle with the public key. Using
> cryptography only this time:
>
>
> >>> public_key = cert.public_key()
> >>> print public_key
> <cryptography.hazmat.backends.openssl.ec._EllipticCurvePublicKey object
> at 0x10fc6dfd0>
>
> So it has the public key, and correctly knows its elliptic curve.
>
> If I now want to break out all of the components/attributes of the public
> key object then how should I do it? What would be the best way? I guess I
> want SubjectPublicKeyInfo as well as the actual public key?
>
>
> The details I am hoping to find include:
>
>         Subject Public Key Info:
>>>             Public Key Algorithm: id-ecPublicKey
>>>                 Public-Key: (256 bit)
>>>                 pub:
>>>                     <-snip->
>>>                 ASN1 OID: prime256v1
>>>                 NIST CURVE: P-256
>>>
>>
>
>
>


-- 
"I disapprove of what you say, but I will defend to the death your right to
say it." -- Evelyn Beatrice Hall (summarizing Voltaire)
"The people's good is the highest law." -- Cicero
GPG Key fingerprint: D1B3 ADC0 E023 8CA6
_______________________________________________
Cryptography-dev mailing list
Cryptography-dev@python.org
https://mail.python.org/mailman/listinfo/cryptography-dev

Reply via email to