TCFS (Time Capsule File System) is a secure, time-based file encryption system that allows you to lock files until a specific future date and time. Think of it as a digital time capsule for your important documents, messages, or any files you want to access only after a certain period.
- β° Time-Based Access Control: Lock files until a specific future date and time
- π Military-Grade Encryption: AES-256-GCM encryption with PBKDF2 key derivation
- π‘οΈ Secure by Design: Original files are securely deleted after encryption
- π Rich Metadata: Store labels, notes, and policy information with encrypted files
- π Status Monitoring: Check remaining time and file information without decryption
- π» Cross-Platform: Works on Windows, Linux, and macOS
- π― Simple CLI Interface: Easy-to-use command-line interface
- C++17 compatible compiler
- CMake 3.15 or higher
- OpenSSL development libraries
- nlohmann/json library
# Clone the repository
git clone https://github.com/code-alchemist01/chronovault.git
cd chronovault
# Create build directory
mkdir build && cd build
# Configure and build
cmake .. -DCMAKE_BUILD_TYPE=Release
cmake --build . --config Release
# The executable will be in build/src/cli/Release/tcfs.exe (Windows)
# or build/src/cli/tcfs (Linux/macOS)After building, you can copy the executable to your PATH or use it directly from the build directory.
First, create a TCFS store (a directory where encrypted files will be stored):
tcfs --store ./my_capsules init --owner "Your Name"Encrypt and lock a file until a specific date:
tcfs --store ./my_capsules lock secret_document.txt \
--unlock-at "2025-12-25T09:00:00Z" \
--label "Christmas Message" \
--notes "A special message for Christmas morning"Important: The original file will be securely deleted after encryption!
View information about a locked file without decrypting it:
tcfs --store ./my_capsules status secret_document.txt.tcfsOutput example:
Status for: secret_document.txt.tcfs
Store file: "./my_capsules/secret_document.txt.tcfs"
Metadata file: ./my_capsules/secret_document.txt.tcfs.meta
Policy: Policy{unlock_at=2025-12-25T09:00:00Z, owner=Your Name, label=Christmas Message, algorithm=AES-256-GCM, kdf=pbkdf2}
Unlock time: 2025-12-25T09:00:00Z
Time remaining: 8640000 seconds
Can unlock: No
Created at: 2024-01-01T12:00:00Z
Original filename: secret_document.txt
Tool version: 0.1.0
Attempt to decrypt and restore a file (only works if the unlock time has passed):
tcfs --store ./my_capsules unlock secret_document.txt.tcfs --output restored_document.txtIf the time hasn't arrived yet:
Cannot unlock yet. Time remaining: 8639950 seconds
Unlock time: 2025-12-25T09:00:00Z
If the time has arrived:
File unlocked successfully!
Decrypted file: restored_document.txt
- TCFS Store: A directory containing encrypted files and metadata
- Encrypted Files (
.tcfs): AES-256-GCM encrypted file content - Metadata Files (
.tcfs.meta): JSON files containing policy and file information - Policy Engine: Enforces time-based access control rules
- AES-256-GCM Encryption: Authenticated encryption providing both confidentiality and integrity
- PBKDF2 Key Derivation: Secure key derivation from passwords with configurable iterations
- Time-Based Access Control: Files cannot be decrypted before the specified unlock time
- Secure File Deletion: Original files are overwritten and deleted after encryption
- Metadata Protection: Critical policy information is stored separately and validated
my_capsules/ # TCFS Store
βββ config.json # Store configuration
βββ document1.txt.tcfs # Encrypted file
βββ document1.txt.tcfs.meta # Metadata and policy
βββ photo.jpg.tcfs # Another encrypted file
βββ photo.jpg.tcfs.meta # Its metadata
{
"version": "1.0",
"owner": "Your Name",
"kdf": "pbkdf2",
"created_at": "2024-01-01T12:00:00Z"
}{
"version": "1.0",
"policy": {
"unlock_at": "2025-12-25T09:00:00Z",
"owner": "Your Name",
"label": "Christmas Message",
"notes": "A special message for Christmas morning",
"algorithm": "AES-256-GCM",
"kdf": "pbkdf2"
},
"created_at": "2024-01-01T12:00:00Z",
"original_filename": "secret_document.txt",
"tool_version": "0.1.0"
}
tcfs/
βββ src/
β βββ libtcfs/ # Core library
β β βββ crypto/ # Cryptographic functions
β β βββ policy/ # Policy management
β β βββ store/ # Store operations
β β βββ utils/ # Utility functions
β βββ cli/ # Command-line interface
βββ include/tcfs/ # Public headers
βββ tests/ # Unit tests
βββ examples/ # Example programs
βββ cmake/ # CMake modules
cmake .. -DCMAKE_BUILD_TYPE=Debug
cmake --build . --config Debug# Build tests (Release configuration recommended)
cmake --build . --config Release
# Run tests
ctest -C Release --verbose # All platforms
# Or run tests directly
./build/tests/Release/tcfs_tests # Linux/macOS
# or
.\build\tests\Release\tcfs_tests.exe # WindowsTest Results: All 32 unit tests pass successfully, including:
- β Cryptographic operations (AES-256-GCM, PBKDF2)
- β Policy management and validation
- β Error handling and edge cases
- β File operations and time-based access control
- Premature Access: Files cannot be accessed before the specified time
- Data Tampering: AES-GCM provides authentication and integrity checking
- Unauthorized Decryption: Strong encryption with secure key derivation
- System Clock Manipulation: If an attacker can modify the system clock, they might bypass time restrictions
- Physical Access: If an attacker has physical access to the system and can modify the binary
- Side-Channel Attacks: Advanced cryptographic attacks are outside the scope of this implementation
- Quantum Computing: Current encryption methods may be vulnerable to future quantum computers
- Backup Encrypted Files: Store copies in multiple secure locations
- Remember Unlock Times: Keep a record of when files can be unlocked
- Secure Your System: Ensure your system clock is accurate and secure
- Regular Updates: Keep TCFS updated to the latest version
We welcome contributions! Please see our Contributing Guidelines for details.
- Fork the repository
- Create a feature branch:
git checkout -b feature/amazing-feature - Make your changes and add tests
- Ensure all tests pass:
cmake --build . --target test - Commit your changes:
git commit -m 'Add amazing feature' - Push to the branch:
git push origin feature/amazing-feature - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- OpenSSL for cryptographic functions
- nlohmann/json for JSON parsing
- CLI11 for command-line parsing
- All contributors and users of TCFS
- Issues: GitHub Issues
- Discussions: GitHub Discussions
- Documentation: Wiki
- GUI App
- Mobile Apps (iOS/Android)
- Cloud Storage Integration
- Multi-User Support
- Advanced Policy Options
- Backup and Recovery Tools
For Turkish documentation, see README-TR.md