amkCrypto installation on win32
Frédéric Laurent
liste_nospam_ at opikanoba.org
Wed Apr 17 12:36:14 EDT 2002
Sur 17 Apr 2002 14:38:15 GMT, vous avez écrit dans comp.lang.python:
> According to Frédéric Laurent <liste_nospam_ at opikanoba.org>:
> > I want to use RSA encoding/decoding, so I downloaded amkCrypto 0.1.3.
> > I use python 2.2 on windows XP.
> >
> > So, I just want to generate a pblic/private key, crypt and decrypt a text
> > buffer... but it sounds to be not so simple to do this !
>
> Try M2Crypto:
I can't ! why ? because neither MS VC++ 6.0 nor Borland C++ is installed on my
computer !
So I can't compile the module ...
and there is no precompiled dll in the win directory of the binary zip package,
even if the documentation says the opposite ...
>
> ngps at vista:~$ python
> Python 2.2 (#7, Mar 31 2002, 23:17:41)
> [GCC 2.95.3 20010315 (release) [FreeBSD]] on freebsd4
> Type "help", "copyright", "credits" or "license" for more information.
> >>> from M2Crypto import RSA
> >>> r = RSA.gen_key(1024, 3)
> ............++++++
> ....................++++++
> >>> r
> <M2Crypto.RSA.RSA instance at 0x8197d2c>
> >>> ptxt = 'plain text'
> >>> import sha
> >>> x = sha.sha(ptxt).digest()
> >>> ctxt = r.public_encrypt(x, RSA.pkcs1_oaep_padding)
> >>> ptxt2 = r.private_decrypt(ctxt, RSA.pkcs1_oaep_padding)
> >>> ptxt2 == x
--
Frédéric Laurent
http://www.opikanoba.org
More information about the Python-list
mailing list