In article <[EMAIL PROTECTED]>, Andrew Veitch <[EMAIL PROTECTED]> wrote:
> I am trying to implement Domain Keys > (http://domainkeys.sourceforge.net/) in Python. > > In Perl I would just use Crypt:RSA which has a sign > method with an armour option which generates exactly > what I want but I can't find a way of doing this in > Python. > > I tried this: > > from M2Crypto import RSA > key = RSA.load_key('rsa.private') > msg='Hello world' > print key.sign(msg) > > But the output isn't quite right because there isn't > an armour option - I verified this by reading the > source. > > I'm not even sure if M2Crypto is the right library to > be using or is it just that I need to use something > else for the final step? Hi Andrew, There's also pycrypto for doing RSA encryption: http://www.amk.ca/python/code/crypto I messed around with this for a little while but decided I didn't need it. ISTR figuring out that it does not implement any padding; is this perhaps the armour option you're talking about? I'm not a cryptographer and I don't even play one on TV, so the accuracy of this is probably even less reliable than an average Usenet posting... Good luck -- Philip http://NikitaTheSpider.com/ Whole-site HTML validation, link checking and more -- http://mail.python.org/mailman/listinfo/python-list