How To Install python-crypto on Ubuntu 20.04
Introduction
In this tutorial we learn how to install python-crypto
on Ubuntu 20.04.
What is python-crypto
python-crypto is:
A collection of cryptographic algorithms and protocols, implemented for use from Python. Among the contents of the package:
- Hash functions: HMAC, MD2, MD4, MD5, RIPEMD160, SHA, SHA256.
- Block encryption algorithms: AES, ARC2, Blowfish, CAST, DES, Triple-DES.
- Stream encryption algorithms: ARC4, simple XOR.
- Public-key algorithms: RSA, DSA, ElGamal.
- Protocols: All-or-nothing transforms, chaffing/winnowing.
- Miscellaneous: RFC1751 module for converting 128-bit keys into a set of English words, primality testing, random number generation.
There are three methods to install python-crypto
on Ubuntu 20.04. We can use apt-get
, apt
and aptitude
. In the following sections we will describe each method. You can choose one of them.
Install python-crypto Using apt-get
Update apt database with apt-get
using the following command.
sudo apt-get update
After updating apt database, We can install python-crypto
using apt-get
by running the following command:
sudo apt-get -y install python-crypto
Install python-crypto Using apt
Update apt database with apt
using the following command.
sudo apt update
After updating apt database, We can install python-crypto
using apt
by running the following command:
sudo apt -y install python-crypto
Install python-crypto Using aptitude
If you want to follow this method, you might need to install aptitude first since aptitude is usually not installed by default on Ubuntu. Update apt database with aptitude
using the following command.
sudo aptitude update
After updating apt database, We can install python-crypto
using aptitude
by running the following command:
sudo aptitude -y install python-crypto
How To Uninstall python-crypto on Ubuntu 20.04
To uninstall only the python-crypto
package we can use the following command:
sudo apt-get remove python-crypto
Uninstall python-crypto And Its Dependencies
To uninstall python-crypto
and its dependencies that are no longer needed by Ubuntu 20.04, we can use the command below:
sudo apt-get -y autoremove python-crypto
Remove python-crypto Configurations and Data
To remove python-crypto
configuration and data from Ubuntu 20.04 we can use the following command:
sudo apt-get -y purge python-crypto
Remove python-crypto configuration, data, and all of its dependencies
We can use the following command to remove python-crypto
configurations, data and all of its dependencies, we can use the following command:
sudo apt-get -y autoremove --purge python-crypto
References
Summary
In this tutorial we learn how to install python-crypto
package on Ubuntu 20.04 using different package management tools: apt
, apt-get
and aptitude
.