Python Cryptography Toolkit (pycrypto)
======================================
This is a collection of both secure hash functions (such as MD5 and SHA),
and various encryption algorithms (AES, DES, RSA, ElGamal, etc.). The
package is structured to make adding new modules easy. I consider this
section to be essentially complete, and the software interface will almost
certainly not change in an incompatible way in the future; all that remains
to be done is to fix any bugs that show up. If you encounter a bug, please
report it in the SourceForge bug tracker at
https://sourceforge.net/tracker/?group_id=20937&atid=120937
An example usage of the MD5 module is:
>>> from Crypto.Hash import MD5
>>> hash=MD5.new()
>>> hash.update('message')
>>> hash.digest()
'x\xe71\x02}\x8f\xd5\x0e\xd6B4\x0b|\x9ac\xb3'
An example usage of an encryption algorithm (AES, in this case) is:
>>> from Crypto.Cipher import AES
>>> obj=AES.new('This is a key456', AES.MODE_ECB)
>>> message="The answer is no"
>>> ciphertext=obj.encrypt(message)
>>> ciphertext
'o\x1aq_{P+\xd0\x07\xce\x89\xd1=M\x989'
>>> obj2 = AES.new('This is a key456', AES.MODE_ECB)
>>> obj2.decrypt(ciphertext)
'The answer is no'
One possible application of the modules is writing secure
administration tools. Another application is in writing daemons and
servers. Clients and servers can encrypt the data being exchanged and
mutually authenticate themselves; daemons can encrypt private data for
added security. Python also provides a pleasant framework for
prototyping and experimentation with cryptographic algorithms; thanks
to its arbitrary-length integers, public key algorithms are easily
implemented.
Development of the toolkit can be discussed on the pct mailing list;
archives and instructions for subscribing at at