Go to
http://www.amk.ca/python/code/crypto.html
.