
Enhanced Data Security with Onion Encryption and Key Rotation
Enhanced Data Security with Onion Encryption and Key Rotation
ABSTRACT:
The rapid growth of cloud-based applications and online data sharing has made information security a critical requirement for individuals and organizations. Sensitive data such as personal documents, academic records, business files, and confidential reports are frequently transmitted and stored over networks, which increases the risk of unauthorized access, data leakage, and cyberattacks. To address these challenges, strong encryption techniques and secure key management methods are essential for ensuring confidentiality, integrity, and controlled access to digital information.
Traditional encryption approaches often rely on a single encryption layer and a fixed secret key, which can become a major security weakness if the key is compromised. In real-world environments, attackers may attempt brute-force attacks, key theft, or database intrusion to recover original content. Hence, there is a strong need for a more advanced protection mechanism that not only encrypts data but also strengthens the security by applying multiple encryption layers and rotating encryption keys periodically to reduce the chances of complete data exposure.
To overcome these issues, this project titled “Enhanced Data Security with Onion Encryption and Key Rotation” is developed using Java as the core programming language, with a user-friendly interface built using JSP, CSS, and JavaScript, and MySQL as the database for storing user and file-related information. The proposed system introduces an enhanced security model by implementing Onion Encryption, where uploaded file content is encrypted in multiple layers using AES-based encryption. Each layer applies a different encryption key, creating a strong multi-level protection mechanism that makes it significantly harder for attackers to retrieve original data even if one layer is breached.
In addition, the system integrates an efficient Key Rotation strategy where encryption keys are dynamically selected from a secure key repository stored in the database. For every file upload, the application automatically selects multiple keys, applies encryption layer-by-layer, and stores the encrypted file along with key sequence metadata required for controlled decryption. The developed application supports secure user authentication, file upload, encrypted file storage, and authorized retrieval while maintaining proper tracking of file ownership and encryption details. Overall, the project provides a reliable and scalable solution for secure file storage and transmission by combining multi-layer encryption with rotating keys, thereby ensuring stronger data protection in modern cloud and web-based environments.
PROJECT OUTPUT VIDEO:
EXISTING SYSTEM:
- The existing system for secure file storage mainly focuses on protecting user data by applying standard encryption techniques before storing or transmitting files. In many applications, users upload their documents through a web interface, and the system stores the files in a centralized server or cloud environment for later access. The main goal of the existing approach is to ensure that stored files remain confidential and can be accessed only by authorized users.
- In the existing system, encryption is commonly performed using a single-layer security mechanism, where the uploaded file content is converted into an encrypted format using a predefined secret key. This encrypted data is then stored in the database or uploaded to cloud storage. Along with encryption, user authentication modules such as login and session management are implemented to ensure that only registered users can upload and retrieve files.
- The existing system also maintains file-related information such as file name, upload time, and user details in the database for tracking and management purposes. In addition, some systems support basic access control features that allow administrators or cloud operators to monitor uploaded files and manage storage operations. Overall, the existing system provides a structured and reliable method for storing and handling digital files securely in web-based environments.
DISADVANTAGES OF EXISTING SYSTEM:
- Single-Layer Encryption Protection: Most existing systems apply only one level of encryption to secure the uploaded file. If the encryption layer is compromised, the complete file content may become accessible, reducing the overall strength of protection.
- Fixed Key Usage: The existing system use a single fixed secret key for encrypting all files. When the same key is repeatedly used, the security depends entirely on that one key, and key exposure can affect multiple stored files.
- Limited Key Management Support: Existing system solutions often do not provide advanced key management features such as key rotation, key sequencing, or dynamic key selection. This makes the encryption process less flexible and reduces the ability to strengthen security over time.
- Higher Risk During Key Compromise: In the existing system, if an attacker gains access to the encryption key, decrypting stored data becomes easier because the same key can unlock the encrypted content. This increases the risk of unauthorized file recovery.
- Lack of Multi-Level Security Architecture: Most existing systems do not follow a layered encryption approach. Without multiple encryption layers, the system may not provide strong defense against advanced attacks that target encryption mechanisms.
- Reduced Protection for Long-Term Storage: In the existing system, for files stored over long periods, using the same encryption method and key continuously may not provide strong protection in the long run. Advanced security systems require periodic improvements, which are not commonly supported in existing approaches.
- Minimal Support for Re-Encryption: Existing systems generally do not support re-encryption mechanisms, where files can be re-secured using new keys or updated encryption methods. This limits the ability to improve security after file storage.
PROPOSED SYSTEM:
- The proposed system titled “Enhanced Data Security with Onion Encryption and Key Rotation” is designed to provide a secure web-based platform for storing and managing digital files in an encrypted form. The system is developed using Java as the core programming language, with a user interface created using JSP, CSS, and JavaScript, and MySQL as the backend database for maintaining user details, file records, encryption keys, and file access information. The main focus of the proposed system is to ensure that uploaded files are protected through strong encryption techniques and structured key management.
- In this system, users can register and log in using valid credentials, after which they can upload files through the application interface. When a file is uploaded, the system reads the file content and applies Onion Encryption, where the file is encrypted in multiple layers. Each layer of encryption uses the AES algorithm, and the output of one encryption layer becomes the input for the next layer, producing a final encrypted file content. This layered encryption mechanism strengthens data confidentiality by securing the file through multiple encryption transformations.
- Along with Onion Encryption, the system implements a Key Rotation mechanism, where the encryption keys are dynamically selected from a key repository stored in the database. For each file upload, the system randomly selects a sequence of keys based on the number of encryption layers configured. The selected key sequence and encryption count are stored as metadata along with the encrypted file record. This stored metadata is used during authorized file retrieval, where the system performs layered decryption in reverse order using the same key sequence to reconstruct the original file content.
- The proposed system also supports secure storage and file management through controlled access. The encrypted file content and related information such as file name, upload time, uploader identity, encryption layer count, and key sequence are stored in the database. In addition, the system can integrate cloud storage using FTP, where encrypted files are uploaded and maintained securely. Overall, the proposed system provides a complete framework for secure file upload, encrypted storage, and controlled retrieval using Onion Encryption combined with key rotation.
ADVANTAGES OF PROPOSED SYSTEM:
- Strong Multi-Layer Data Protection: The proposed system implements Onion Encryption, where files are encrypted in multiple layers. This layered approach increases the overall strength of data security by ensuring that the file remains protected through more than one encryption transformation.
- Improved Key Security Through Key Rotation: In the proposed system, instead of using a single key repeatedly, the proposed system applies Key Rotation by selecting encryption keys dynamically from the database. This enhances key confidentiality and reduces dependency on a fixed encryption key.
- Enhanced Resistance to Unauthorized Access: In the proposed system, since the stored content is encrypted in multiple layers using different keys, it becomes significantly harder for unauthorized users to interpret or recover the original file content even if they gain access to encrypted storage.
- Secure Storage in Database and Cloud: The proposed system stores only encrypted file content along with encryption metadata in MySQL, and it can also upload encrypted files to cloud storage (FTP server). This ensures that data remains protected both in local database storage and remote cloud environments.
- Controlled and Authorized File Retrieval: The proposed system supports secure decryption only for authorized users by using stored metadata such as encryption count and key sequence. This provides a controlled mechanism for retrieving original files without exposing encryption keys directly.
- Better Data Confidentiality for Long-Term Storage: By combining multi-layer encryption and rotating keys, the proposed system ensures that files stored for longer periods remain strongly protected and less predictable to attackers.
- Efficient and User-Friendly Web Interface: In the proposed system, the application is developed with JSP, CSS, and JavaScript, providing a simple and interactive interface for users to register, log in, upload files, and access secure file services smoothly.
- Scalable and Maintainable Implementation: The proposed system is implemented using Java and MySQL, making it easy to maintain, extend, and scale for future enhancements such as role-based access control, audit logs, and advanced key management policies.
SYSTEM REQUIREMENTS:
HARDWARE REQUIREMENTS:
- System : Pentium i3 Processor.
- Hard Disk : 20 GB.
- Monitor : 15’’ LED.
- Input Devices : Keyboard, Mouse.
- Ram : 8 GB.
SOFTWARE REQUIREMENTS:
- Operating system : Windows 10/11.
- Coding Language : Java.
- Frontend : JSP, CSS, JavaScript.
- JDK Version : JDK 23.0.1.
- IDE Tool : Apache Netbeans IDE 24.
- Tomcat Server Version : Apache Tomcat 9.0.84
- Database : MySQL.



