[pycrypto] RSA importKey
François Santy
francoissanty at gmail.com
Fri Nov 12 07:32:45 CST 2010
I have another Question concernant PyCrypto's implementation of RSA: which
encryption mode is it using?
I had to use PyCrypto's implementation of DES recently, and I could easily
choose between several modes (MODE_EBC, MODE_CBC,...), but unfortunatly, I
can't find these modes in RSA.
The same question applied for the Padding options. Can I choose between
PKCS5Padding and PKCS1Padding ?
Thanks !
2010/11/12 François Santy <francoissanty at gmail.com>
> Hi everybody !
>
> I'm currently working with pycrypto and I want to import public and private
> keys from DER files.
> I found a piece of code that shows how to proceed, but it isn't working
> anyway !
> Here is the code I'm using:
>
> f = file("./public_key.der")
> key = RSA.importKey(f.read())
>
> It tells me *'module' object has no attribute 'importKey'. *It's rather
> strange since the method appears explicitely in the file
> /lib/Crypto/PublicKey/RSA.py*.*
> *
> *
> What am I doing wrong ?
>
> Thanks.
>
> --
> François S.
>
--
François S.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.dlitz.net/pipermail/pycrypto/attachments/20101112/aeeeeae8/attachment.htm
More information about the pycrypto
mailing list