Developer: Eder Gutiérrez
Date: February 24, 2026
This project implements a comprehensive cybersecurity system focused on cryptography using Python. Unlike a standard linear script, this program is designed as an event-driven daemon (background process) capable of proactively monitoring the file system, including recursive subdirectories.
The primary objective is to solve the speed limitations of the RSA algorithm and the key exchange vulnerability of AES by combining both into a robust, fast, and automated system. It ensures data integrity without constant user intervention, provides real-time terminal feedback, and maintains an audit log.
| Tool | Role in Project |
|---|---|
| Python 3.x | Core development language. |
| PyCryptodome | Implementation of RSA (Asymmetric) and AES-256 (Symmetric) algorithms. |
| Watchdog | Kernel event management for real-time directory monitoring. |
| Pathlib | Advanced manipulation of file paths and extensions. |
| Zlib | Data compression prior to encryption to optimize storage. |
| Logging | Native library used for technical audit logs. |
The system operates under the following mathematical workflow to ensure both security and efficiency:
-
Symmetric Encryption: A random 16-byte Session Key is generated to encrypt the file using AES-EAX.
$$C = E_{AES_K}(P)$$ -
Asymmetric Encryption: The Session Key is encrypted using the RSA-2048 Public Key.
$$K_{enc} = E_{RSA_Pub}(K)$$ - Packaging: A payload is constructed by concatenating the encrypted key, the nonce, the authenticity tag, and the encrypted content, all encoded in Base64 for portability.
- Observer Pattern: Implemented via the
watchdoglibrary, subscribing to file system events whereon_closedacts as the primary trigger. - Security Filters: A custom suffix system (
.ederLockAlgorithm) was developed to prevent infinite encryption loops. - Lifecycle Management: A "Secure Deletion" policy using
path.unlink()ensures the original plaintext file is destroyed immediately after successful encryption. - User-Friendly Interface: Real-time visual guidance in the terminal to monitor ongoing processes.
This implementation demonstrates that information security depends not only on algorithmic robustness but also on the supporting architecture. By integrating event-based monitoring, the system evolves from a manual tool into an automated, transparent security service. Using industry standards like RSA-2048 and AES-EAX guarantees that data remains inaccessible without the corresponding private key, laying the groundwork for complex data protection systems in private clouds.
- Python 3.10 or higher.
- Pip (Python package manager).
It is highly recommended to use a virtual environment (venv) to avoid dependency conflicts.
-
Create the virtual environment:
python3 -m venv venv
-
Activate the environment:
source venv/bin/activate -
Install dependencies:
pip install -r requirements.txt
Launch the main script with the following command:
python main.pyFollow the on-screen instructions to generate RSA keys or start directory monitoring for encryption/decryption.