This Python script implements a CryptoManager
class for handling both symmetric and asymmetric encryption. It includes:
- Symmetric Encryption: Uses AES with a key derived from a user-provided password via PBKDF2. Supports encryption and decryption of messages.
- Asymmetric Encryption: Generates RSA keys, and supports encryption and decryption using RSA with OAEP padding.
- Key Management: Functions to save RSA keys to and load them from PEM files.
- Derives symmetric keys from passwords and salts.
- Encrypts and decrypts messages using AES and RSA.
- Saves and loads RSA keys securely.
1- Clone the repository:
git clone https://github.com/Mehdipoladrag/cryptography.git
2- Create a virtual environment:
python -m venv .venv
3- Activate the virtual environment:
.venv\Scripts\activate
4- pip install -r requirements.txt:
pip install -r requirements.txt