Add support for exporting/importing RSA keys in DER and PEM format
Bug #500820 reported by
Legrandin
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Python-Crypto |
Fix Released
|
Wishlist
|
Unassigned |
Bug Description
I have created a patch for importing and exporting
RSA keys in the stadard, openssl-friendly DER and
PEM formats. Extensive test facilities are included.
Typical usage for importing an RSA key:
f = file("ssl.pem")
key = RSA.importKey(
f.close()
key.verify(hash, signature)
Typical usage for exporting an RSA public key:
key = RSA.generate(512, randfunc)
f = file("ssl.der","w")
f.write(
f.close()
I confirm I am eligible for submitting code to pycrypto according
to http://
fetched on 27 December 2009.
Changed in pycrypto: | |
status: | New → Confirmed |
status: | Confirmed → In Progress |
Changed in pycrypto: | |
importance: | Undecided → Wishlist |
Changed in pycrypto: | |
milestone: | none → 2.1.0 |
milestone: | 2.1.0 → none |
milestone: | none → 2.2 |
To post a comment you must log in.
Thanks!
I want to review this change before committing it (particularly the changes to the API), since I am suspicious of anything to do with ASN.1 in general or with PKCS#12 in particular. See the links below to get some idea as to why:
http:// www.cs. auckland. ac.nz/~ pgut001/ pubs/pfx. html www.cs. auckland. ac.nz/~ pgut001/ pubs/x509guide. txt
http://
But since you've supplied code, tests, and documentation, and since a few people have asked for some kind of OpenSSL interoperability, I'll at least have a look. :)