[Cryptography-dev] Help required for RSAPrivateKeyWithSerialization
Paul Kehrer
paul.l.kehrer at gmail.com
Sat Mar 7 16:34:20 CET 2015
Hi Olivier,
The currently released version (0.7.2) does not support saving the keys, but 0.8 (which should be out in the next few days) will support it via "private_bytes" (https://cryptography.io/en/latest/hazmat/primitives/asymmetric/rsa/#cryptography.hazmat.primitives.asymmetric.rsa.RSAPrivateKeyWithSerialization.private_bytes). At that point when you call rsa.generate_private_key() you can verify you get back an object with the RSAPrivateKeyWithSerialization interface by calling isinstance(key, rsa.RSAPrivateKeyWithSerialization).
-Paul Kehrer
On March 7, 2015 at 8:59:44 AM, olivier sallou (olivier.sallou at gmail.com) wrote:
Hi,
I followed examples to create an rsa (public/private) key and it works fine.
I do not see however how to "save" my keys for later reuse/exchange.
I see no "export/convertt to bytes" method to save keys in a file.
In documentation, there are references to RSAPrivateKeyWithSerialization but I do not see how to get one from rsa.generate_private_key().
Could you help me?
Thanks
Olivier
_______________________________________________
Cryptography-dev mailing list
Cryptography-dev at python.org
https://mail.python.org/mailman/listinfo/cryptography-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/cryptography-dev/attachments/20150307/d3b74217/attachment.html>
More information about the Cryptography-dev
mailing list