views:

85

answers:

2

Any recommendations on an AES encryption library that's compatible with Python 2.7 for Windows?

In the past we've used m2crypto with Python 2.6, but there's no version of m2crypto for Python 2.7 and our attempts to build a version from source have failed.

Thank you, Malcolm

A: 

Have you looked at the PyCrypto library?

http://www.dlitz.net/software/pycrypto/

It should be compatible with Python 2.7

You might also take a look at pycryptopp, a wrapper around the Crypto++ library.

http://tahoe-lafs.org/trac/pycryptopp

Paul McMillan
hey nice one. just a heads up only certain ones are compatible. the 64 bit version is not yet compatible.
Pavan
Yeah, that's why I included a link to the pycryptopp package - that'll compile most places and is a decent alternative. And I agree with you, m2crypto is likely to be updated pretty quickly.
Paul McMillan
ok. See now that's the a nice way to handle this situation. I haven't down voted you have i? I've just given you a heads up. But you're just kicking me down by down voting when you could have given me a heads up like I did with you? right? a vote down is un called for and unnecessary.
Pavan
Thank you Paul. I really appreciate your link to the mailing list reference to Python 2.7.
Malcolm
Hey! Where did Pavan's answer go? How can I downvote it further if it just disappears like this?
Brandon Craig Rhodes
+1  A: 

Actually, the M2Crypto package supports Python 2.7 just fine — I have been using it in a cryptography-heavy application with no problem. I suppose the problem here is that Windows does not come with a compiler, so you cannot easily install the .tar.gz off of PyPI? Or are you getting an error when you try to compile it?

I would suggest that the best response to an error would be posting it to Stack Overflow so that we could fix it, instead of asking for alternative to what is — so far as I can tell — the premier cryptography library for Python.

Update: I have now successfully built M2Crypto for Windows under Python 2.7, so I can personally confirm that it works fine with Python 2.7 on all major platforms.

Brandon Craig Rhodes
I agree... figuring out why M2Crypto isn't compiling is probably a better use of the time. You should contribute a Python 2.7 package...
Paul McMillan
Good idea! I have emailed the maintainer to see what has to happen for me to contribute. Of course, since I live in the United States, it is quite possible that they will not want me to contribute any eggs lest I violate export restrictions or something.
Brandon Craig Rhodes
They've got a US export restriction notice on the page, so presumably you're in the clear.
Paul McMillan
Brandon: Thank you for confirming compatibility. Mondhan has posted links for Python 2.7 Windows M2Crypto installers.http://stackoverflow.com/questions/3857450/m2crypto-python-2-7-compatibility-and-which-version-of-openssl-to-use
Malcolm
Great! I am glad that someone with the ability to compile them found the time to release the results. I will go suggest that he edit the M2Crypto front page (it's a wiki) and add links to his builds.
Brandon Craig Rhodes