PyCrypto

Let's learn about PyCrypto and how it can be used.

The PyCrypto package is probably the most well known 3rd party cryptography package for Python. Sadly PyCrypto’s development stopped in 2012. Others have continued to release the latest version of PyCrypto so we can still get it for Python 3.5 if we don’t mind using a 3rd party’s binary.

Fortunately there is a fork of the project called PyCrytodome that is a drop-in replacement for PyCrypto.

You need Python 3.5 for Crypto and PyCrypto

How to install pycryptodome

To install it for Linux, we can use the following pip command:

Press + to interact
pip3 install pycryptodome

Windows is a bit different:

Press + to interact
pip3 install pycryptodomex

If we run into issues, it’s probably because we don’t have the right dependencies installed or we need a compiler for Windows.

Also worth noting is that PyCryptodome has many enhancements over the last version of PyCrypto. It is well worth our time to visit their home page and see what new features ...

Get hands-on with 1400+ tech skills courses.