Because your secrets deserve CipherSafe.
CipherSafe is a console-based secure file vault application built in C++, designed to simulate how encrypted file storage systems work internally.
The project focuses on core backend concepts such as authentication, encryption, file system design, metadata management, and clean architecture — without relying on any GUI frameworks.
Note: This project is built for learning and demonstration purposes. Encryption used is XOR-based and not intended for production security.
-
- Master user sign-up & sign-in
- Secure password hashing with salt
- Persistent user storage (JSON-based)
- Session-based login tracking
-
- Import & encrypt files into a secure vault
- Per-file metadata management
- Unique ID-based file tracking
- Automatic directory creation per file
-
- Soft delete (move to
temp/) - Recover deleted files
- Permanent purge (irreversible)
- Encrypted files stored at rest
- Soft delete (move to
-
- XOR-based encryption & decryption
- Binary-safe (works for text, images, etc.)
- Key derived from logged-in master user
| Component | Technology |
|---|---|
| Language | C++ (C++20) |
| Build Tool | g++ (MinGW on Windows) |
| Storage | File System + JSON |
| Encryption | XOR-based (custom) |
| Libraries | STL, <filesystem>, nlohmann/json |
-
std::vectorstd::stringstd::filesystemstd::fstreamstd::ctime
-
- Used for persistent storage of:
- User credentials
- Vault index
- File metadata
- Used for persistent storage of:
- nlohmann/json — Header-only JSON library for C++
Created by Niels Lohmann
Used for structured and persistent data storage (auth.json, vault index, metadata).
GitHub: https://github.com/nlohmann/json
| Structure | Purpose |
|---|---|
vector<VaultFile> |
Tracks all vault files |
struct VaultFile |
Stores file metadata |
enum class FileLocation |
Objects vs Temp |
| JSON Arrays | Persistent indexing |
-
- Handles master users
- Password hashing & verification
- Login session tracking
- Persistent storage in
auth.json
-
- Manages encrypted files
- Handles file lifecycle
- Maintains
vault_index.json - No UI responsibility (logic-only)
-
AuthUI→ Authentication menuDashboardUI→ Vault operations- Input validation & flow control
-
- Load existing master users
- Display authentication menu
-
- User signs up OR signs in
- Password is verified via hashing
- Session is established
-
User can:
- Import & encrypt files
- List stored files
- Decrypt files
- Soft delete / recover
-
- Session cleared
- Vault state saved
- Return to auth menu
- File bytes are XOR-ed with a repeating key
- Same function used for encryption & decryption
- Binary-safe implementation
- g++ (C++17 or later)
- MinGW (Windows) or GCC (Linux)
g++ src/main/*.cpp src/ui/*.cpp src/utils/*.cpp src/managers/*.cpp -Iinclude/utils/ -Iinclude/ui/ -Iinclude/libs/ -Iinclude/managers/ -o CipherSafeCipherSafe.exe.\CipherSafe
