SecureVault: Advanced File Storage System
SecureVault: Advanced File Storage System
A Report Submitted
In Partial Fulfillment
for award of Bachelor of Technology
In
COMPUTER SCIENCE AND ENGINEERING
By
1
Computer Science and Engineering
DECLARATION
I hereby declare that the work presented in this report was carried out by me. I have not
submitted the matter embodied in this report for the award of any other degree or diploma of
any other University or Institute.
i
Computer Science and Engineering
CERTIFICATE
Certified that Ashish Kumar(Roll No: 2401331690013) , Dwiz Vrat Sharma(Roll No:
2401331690020) and Khushboo Gupta(Roll No: 2401331690030) ,has carried out the
Advanced Java project work presented in this Project Report at <Organization name>in
Integrated Technology, department name from Dr. APJ Abdul Kalam Technical
Signature Signature
Date:
ii
Computer Science and Engineering
ACKNOWLEDGEMENT
I would like to express my heartfelt gratitude to Ms. Aditee Mattoo for her invaluable guidance,
support, and constant supervision throughout the development of this project. Their expertise and
encouragement have been pivotal in shaping the project.
I would also like to extend my thanks and appreciation to our esteemed HOD (Dr. Kumud Saxena)
for her continuous motivation and support. Their encouragement has been instrumental in completing
this project successfully.
Finally, I am deeply thankful to my peers and everyone who directly or indirectly contributed
to this project with their knowledge, advice, and assistance.
iii
Computer Science and Engineering
ABSTRACT
iv
Computer Science and Engineering
TABLE OF CONTENTS
Page No.
Declaration i
Certificate from the institute ii
Certificate from the industry iii
Acknowledgement iv
Abstract v
CHAPTER 1: INTRODUCTION 1-4
1.1 INTRODUCTION
1.1.1 BACKGROUND REVIEW
1.2 PROBLEM STATEMENT
1.3 OBJECTIVES AND SCOPE OF PROJECT
1.3.1 OBJECTIVES
1.3..2 SCOPE
1.4 LIMITATIONS
1.5 PROJECT ORGANIZATION
1
Computer Science and Engineering
4.2 TESTING
4.3 SCREENSHOTS
REFERENCES 38
APPENDICES 39-42
PUBLICATIONS (optional) 43
CURRICULUM VITAE
2
Computer Science and Engineering
CHAPTER 1
INTRODUCTION:
Key Contents:
1
Computer Science and Engineering
In the modern digital age , file storage and that too secure is very [Link] the
exponential growth of digital data and the rising concerns about privacy and data breaches,
individuals and organizations are constantly seeking reliable solutions to protect their
sensitive information. Traditional file storage systems often rely on basic security measures
that may not provide adequate protection against sophisticated cyber threats.
The motivation behind developing SecureVault stems from the fundamental need to create a
secure, user-friendly file storage system that ensures complete privacy and data protection.
Unlike conventional cloud storage services where users must trust third-party providers with
their data, SecureVault implements end-to-end encryption, ensuring that files remain
encrypted even at rest. This approach gives users complete control over their data, with the
ability to manage their own encryption keys.
“ Lack of Secure storage solutions ” , is the main motivation behind this project . Are there
not enough storage solutions out there to help people with daily needs ? Yes there are , but
there are multiple severe issues with them :
1. Security Vulnerabilities: Many file storage systems store files in plaintext or use weak
encryption methods, making them vulnerable to unauthorized access. Even when encryption
is implemented, users often have no visibility into the encryption process or control over their
encryption keys.
2. Privacy Concerns: Traditional cloud storage services require users to trust third-party
providers with their sensitive data. Users have no guarantee that their files are not being
accessed, scanned, or shared without their knowledge. This lack of transparency creates
significant privacy risks.
3. Key Management Challenges: Existing systems often manage encryption keys on behalf
of users, which means users lose control over their data if the service provider is
compromised. There is a need for systems that allow users to manage their own keys while
maintaining usability.
2
Computer Science and Engineering
1.3.1 Objectives :
1. Develop a Secure File Storage System: Create a comprehensive file storage system that
implements end-to-end encryption using industry-standard algorithms (AES- 256 and RSA-2048).
2. Implement User Authentication: Develop a robust authentication system that securely stores user
credentials using RSA-based password signing, ensuring that passwords are never stored in plaintext.
3. Provide Key Management: Enable users to view, manage, and verify their encryption keys, giving
them complete control over their data security.
4. Ensure User Privacy: Implement user-based file isolation so that each user can only access their own
files, preventing unauthorized access to other users' data.
[Link] Recovery: The system does not implement key recovery mechanisms. If users lose their
encryption keys, they cannot recover their encrypted files.
[Link] Sharing: The current version does not support file sharing between users. Each user can
only access their own files.
[Link]: The custom database and filesystem implementations are designed for single-
machine use and may not scale to handle large numbers of concurrent users or massive file storage
requirements.
3
Computer Science and Engineering
Chapter 1: Introduction provides the background, motivation, problem statement, objectives, and scope of
the project. It sets the context for understanding why SecureVault was developed and what problems it
aims to solve.
Chapter 2: Literature Review examines existing research and implementations related to cryptography,
secure file storage, authentication mechanisms, and database systems. This chapter establishes the
theoretical foundation for the project.
Chapter 3: Requirement Analysis details the functional and non-functional requirements of the system,
including security requirements, performance expectations, and usability considerations. It also presents
the system architecture and design.
Chapter 4: Implementation & Testing describes the actual development process, including the
implementation of all system modules, the technology stack used, and the testing methodologies employed
to ensure system reliability and security.
Chapter 5: Conclusion and Future Work summarizes the achievements of the project, discusses
limitations encountered during development, and outlines potential future enhancements and
improvements.
4
Computer Science and Engineering
CHAPTER 2
LITERATURE REVIEW:
The central design choice of SecureVault while combining RSA[1] and AES[2] , places it
within the field of Hybrid Cryptography. This approach is universally adopted in modern
communications and storage (e.g., SSL/TLS, secure cloud storage) to achieve the speed of
symmetric encryption and the secure key exchange of asymmetric encryption.
Cryptography forms the backbone of secure data storage and transmission. Understanding the fundamental
principles and algorithms is essential for implementing a secure file storage system.
2.1.1 AES :
The Advanced Encryption Standard (AES) is a symmetric encryption algorithm that has
become the de facto standard for encrypting data. Developed by the National Institute of
Standards and Technology (NIST) and adopted in 2001, AES replaced the aging Data
Encryption Standard (DES).
AES operates on fixed-size blocks of data (128 bits) and supports three key sizes: 128, 192,
and 256 bits. The algorithm uses a series of transformations including SubBytes, ShiftRows,
MixColumns, and AddRoundKey operations. The number of rounds depends on the key size:
10 rounds for AES-128, 12 rounds for AES-192, and 14 rounds for AES-256.
The security of AES lies in its resistance to known cryptographic attacks. After more than
two decades of analysis by cryptographers worldwide, AES remains secure and is widely
trusted for protecting sensitive information. AES-256, in particular, is considered secure
enough for protecting classified information by government agencies.
5
Computer Science and Engineering
For SecureVault, AES-256 was chosen because it provides the highest level of security
among the AES variants. Each file is encrypted with a unique randomly generated 256-bit
key, ensuring that even if one file's key is compromised, other files remain secure.
RSA security is based on the mathematical difficulty of factoring large prime numbers. The
algorithm involves generating two large prime numbers, computing their product (the
modulus), and using Euler's totient function to derive the public and private exponents. The
public key consists of the modulus and public exponent, while the private key consists of the
modulus and private exponent.
In SecureVault, RSA-2048 is used for password signing rather than traditional encryption.
When a user registers, their password is combined with their email address, hashed using
SHA-256, and then signed with the RSA private key. This approach ensures that passwords
are never stored in plaintext and provides a way to verify password authenticity without
storing the actual password hash in a reversible form.
RSA-2048 provides adequate security for the current threat landscape, though RSA-3072 or
RSA-4096 would be recommended for long-term security. The 2048-bit key size was chosen
as a balance between security and performance.
End-to-end encryption models ensure that data remains encrypted throughout its lifecycle,
from creation to storage to retrieval. The encryption happens on the client side, and the server
or storage system never sees the unencrypted data.
6
Computer Science and Engineering
Effective key management is crucial for secure file storage. Keys must be generated securely,
stored safely, and made accessible to authorized users while remaining inaccessible to
unauthorized parties.
SecureVault implements a per-file key management system where each file has its own
unique encryption key. This approach has several advantages:
The system stores keys in file metadata, allowing users to retrieve them when needed.
However, users are also encouraged to save their keys separately for backup purposes, as key
loss results in permanent data loss.
7
Computer Science and Engineering
The custom filesystem implementation in SecureVault manages file storage with metadata
support. It provides:
Metadata plays a crucial role in SecureVault, storing essential information about each file
including:
•Original filename
•Encryption key
•User ownership (email)
•Encryption status and algorithm
•Creation and access timestamps
•File size
This metadata enables the system to filter files by user, verify encryption status, and provide
users with information about their stored files. The metadata is stored separately from the
encrypted file data, allowing efficient querying and management.
8
Computer Science and Engineering
CHAPTER 3
•Data Encryption: All files must be encrypted using AES-256 before storage.
Encryption keys must be unique for each file and generated using cryptographically
secure random number generation.
•Password Security: Passwords must be stored using RSA-based signing, never in
plaintext. The system must implement secure password validation and prevent
common vulnerabilities like SQL injection or timing attacks.
•Access Control: The system must enforce strict access control:
9
Computer Science and Engineering
•File Upload: Files should be encrypted and stored within reasonable time limits.
Small files (under 10MB) should be processed in under 5 seconds.
•File Download: Decryption and file saving should complete quickly. The system
should provide progress feedback for large files.
•User Interface: The interface should be responsive, with UI updates happening within
100ms of user actions.
•Database Operations: Database queries should complete quickly, with typical
operations (user lookup, file metadata retrieval) completing in under 100ms.
•Memory Usage: The system should handle typical file sizes without excessive
memory consumption. Files are processed in chunks when possible to manage
memory efficiently.
3.2.3 Usability Requirements
•Intuitive Interface: The user interface should be intuitive, requiring minimal learning
curve. Users should be able to upload, download, and manage files without extensive
training.
•Clear Feedback: The system must provide clear, actionable feedback for all user
actions:
•Success messages for completed operations
•Error messages that explain what went wrong and how to fix it
•Progress indicators for long-running operations
•Modern Design: The interface should follow modern design principles, inspired by
successful platforms like [Link], with:
•Clean, uncluttered layouts
•Consistent color schemes and typography
•Smooth animations and transitions
•Responsive button states and hover effects
•Accessibility: The interface should be accessible to users with varying technical
skills, providing:
•Clear labels and instructions
•Helpful tooltips and guidance
•Error prevention through validation
10
Computer Science and Engineering
•Data Integrity: Files must be stored and retrieved correctly without corruption. The
encryption/decryption process must not alter file contents.
•Error Recovery: The system must handle errors gracefully:
11
Computer Science and Engineering
12
Computer Science and Engineering
13
Computer Science and Engineering
Registration Flow:
14
Computer Science and Engineering
15
Computer Science and Engineering
CHAPTER 4
1 Testing
We use a [Link] file to auto tets all of our backend features and test them out all at
once. These features are key to the encryption module and need to be properly tested before
usage to avoid any outage or failure of service.
Key Components:
Substitution Box (S-Box): Implemented a 256-byte lookup table for nonlinear byte
substitution, with corresponding inverse S-Box for decryption operations
16
Computer Science and Engineering
Padding Mechanism: Implements PKCS7 padding to ensure data aligns with 16-
byte block boundaries
The RSA encryption module leverages Java's BigInteger class for handling large integer
arithmetic necessary for 2048-bit key operations. The implementation follows the RSA
algorithm specification [3].
[Link] Exponent Selection: Uses the standard public exponent e = 65537, ensuring
it is coprime with φ(n)
[Link] Exponent Calculation: Computes d = e^(-1) mod φ(n) using the Extended
Euclidean Algorithm via [Link]()
The implementation handles message size limitations by encrypting only the AES
keys (typically 256 bits) with RSA, while file data encryption uses AES, following industry-
standard hybrid encryption practices [4].
17
Computer Science and Engineering
Table Structure:
Data Persistence:
Tables are serialized to disk using Java Object Serialization, stored as .table files in
the database directory
Index structures are serialized alongside table data for rapid query performance
Indexing Mechanism:
Index structure maps column values to lists of records containing those values
Indexes are automatically maintained during insert, update, and delete operations
Transaction Support:
18
Computer Science and Engineering
4.3 Implementation
19
Computer Science and Engineering
20
Computer Science and Engineering
21
Computer Science and Engineering
22
Computer Science and Engineering
CHAPTER 5
5.1. Conclusion
23
Computer Science and Engineering
24
Computer Science and Engineering
[Link] Interface Design: Separating UI thread from server operations is essential for
responsive user experience
25
Computer Science and Engineering
REFERENCES
[1] NIST Special Publication 800-38A, "Recommendation for Block Cipher Modes of
Operation: Methods and Techniques," National Institute of Standards and Technology, 2001.
[2] NIST Special Publication 800-57 Part 1 Revision 4, "Recommendation for Key Management: Part 1:
General," National Institute of Standards and Technology, 2016.
[3] RFC 3447, "Public-Key Cryptography Standards (PKCS) #1: RSA Cryptography Specifications
Version 2.1," Network Working Group, 2003.
[4] RFC 5246, "The Transport Layer Security (TLS) Protocol Version 1.2," Network Working Group,
2008.
[5] Silberschatz, A., Galvin, P.B., and Gagne, G., "Operating System Concepts," 10th Edition, John Wiley
& Sons, 2018.
[6] Tanenbaum, A.S. and Wetherall, D., "Computer Networks," 5th Edition, Prentice Hall, 2011.
[7] Fielding, R.T., "Architectural Styles and the Design of Network-based Software Architectures," PhD
Dissertation, University of California, Irvine, 2000.
[8] Oracle Corporation, "Java Cryptography Architecture (JCA) Reference Guide," Oracle Documentation,
2023.
26
Computer Science and Engineering
APPENDICES
27
Computer Science and Engineering
28