PyCrypto - The Python Cryptography Toolkit

Fork me on GitHub

Download Latest (v2.6.1) | Mailing List | Bugs | API Docs | Source Repo (GitHub)

Random number generation

Here is the current list of known random number generation issues/bugs that have been found in previous versions of PyCrypto:

Keeping an entropy pool in a user-space program is complex and error-prone. It is especially difficult to do reliably in a generic crypto library, and it is quite common for mistakes to be made. Hopefully, operating systems will one day provide random number generation facilities that are sufficiently fast, trustworthy, and reliable that they can completely replace the multitude of user-space random number generators that currently plague our software.

Download the latest release

The latest stable release is available here:

The latest experimental release is available here:

SHA256 sums:

f2ce1e989b272cfcb677616763e0a2e7ec659effa67a88aa92b3a65528f60a3c *pycrypto-2.6.1.tar.gz
c2ab0516cc55321e6543ae75e2aa6f6e56e97432870f32a7799f3b89f467dc1b *pycrypto-2.6.1.tar.gz.asc

ee4013e297e6a5da5c9f49a3e38dc8a5c62ae816377aa766c9e87474197be3b9 *pycrypto-2.7a1.tar.gz
726c2711133ca210c3bc1c9f75c9d638a6235cacef8f8129fb61879e2f336e1a *pycrypto-2.7a1.tar.gz.asc



Bugs and feature requests are tracked on GitHub. If you are interested in contributing, please join the mailing list.

The source code is now managed on GitHub. Clone it using git by running the following command:

git clone

Submitting patches

In an effort to clarify PyCrypto's licensing terms and export control status, all new patch submissions must meet the requirements set out in the document, "PyCrypto Code Submission Requirements - Rev. D".

Once you have confirmed that you meet the "Code Submission Requirements" above, please send me a push request on GitHub. Alternatively, you can send your patches to the mailing list.

Tips for getting your patches accepted:

Export of cryptography software

The export of cryptography software is (still) governed by arms control regulations in Canada, the United States, and elsewhere. The export or re-export of this software may be regulated by law in your country.