[Cryptography-dev] ecdsa key x/y coordinates

Alex Gaynor alex.gaynor at gmail.com
Tue Apr 21 13:08:19 CEST 2015


Hi Olivier,

You can use the private_numbers() method:
https://cryptography.io/en/latest/hazmat/primitives/asymmetric/ec/#cryptography.hazmat.primitives.asymmetric.ec.EllipticCurvePrivateKeyWithNumbers.private_numbers

To get an EllipticCurvePrivateNumbers which has x and y attributes.

Alex

On Tue, Apr 21, 2015 at 3:07 AM, Olivier Sallou <olivier.sallou at irisa.fr>
wrote:

> Hi,
> I load an ecdsa private key in my program:
>
>             secret =
> load_pem_private_key(content_file.read().encode('utf-8'),
>                                               password=None,
> backend=default_backend())
>
> That's fine....
>
> I need now to get the x and y coordinates of my ecdsa key to share it
> with an other program. Is there any way to get it ? I do not find in API
> the way to do so.
>
> Thanks
>
> Olivier
>
> --
>
> gpg key id: 4096R/326D8438  (keyring.debian.org)
> Key fingerprint = 5FB4 6F83 D3B9 5204 6335  D26D 78DC 68DB 326D 8438
>
> _______________________________________________
> Cryptography-dev mailing list
> Cryptography-dev at python.org
> https://mail.python.org/mailman/listinfo/cryptography-dev
>



-- 
"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: 125F 5C67 DFE9 4084
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/cryptography-dev/attachments/20150421/74d6b7bb/attachment.html>


More information about the Cryptography-dev mailing list