Encrypting and decrypting information with pycryptodome
In this section, we will review cryptographic algorithms and the pycryptodome
module for encrypting and decrypting data.
Introduction to pycryptodome
The PyCryptodome (https://pypi.org/project/pycryptodome) cryptographic module supports functions for block encryption, flow encryption, and hash calculation. This module is written mostly in Python but has routines written in C for performance reasons. Among the main characteristics, we can highlight the following:
- The main block ciphers supported are HASH, Advanced Encryption Standard (AES), DES, DES3, IDEA, and RC5.
- Authenticated encryption modes (GCM, CCM, EAX, SIV, and OCB).
- Elliptic curve cryptography.
- Rivest-Shamir-Adleman (RSA) and DSA key generation.
- Improved and more compact APIs, including nonce and initialization vector (IV) attributes for ciphers to randomize the generation of data. Nonce is a term used in cryptography that...