Secure offline file encryption and integrity verification system for controlled environments.
ShadowLock is a local security tool designed to protect sensitive files through strong encryption, integrity verification, and tamper-evident forensic logging. It operates entirely offline and is intended for scenarios where data confidentiality and auditability matter more than convenience.
Many encryption tools focus on confidentiality but provide limited visibility into file history, integrity, or forensic state.
ShadowLock was built to explore how encryption, integrity checking, and audit logging can be combined into a single, operator-controlled system without relying on external services.
ShadowLock follows a deterministic workflow:
- Deployment of source and encrypted directories
- Per-file encryption using derived keys
- Integrity verification using encrypted SHA-256 hashes
- Tamper-evident forensic logging with HMAC chaining
- Controlled recovery, audit, and emergency access modes
shadowlock/
├── shadowlock.py
├── README.md
└── .gitignore
Deploy the system by defining a source directory and an encrypted directory:
python shadowlock.py --deploy <SOURCE_DIRECTORY> <ENCRYPTED_DIRECTORY>Once deployed, ShadowLock supports operations such as:
- Reviewing and synchronising file changes
- Verifying file integrity
- Auditing all protected files
- Dumping or cloning decrypted files
- Creating and restoring encrypted backups
- Generating forensic reports
- Emergency recovery using panic mode
Run the built-in help menu for full command details:
python shadowlock.py --helpEach protected file is:
- Encrypted using AES-GCM
- Assigned a unique per-file key derived via HKDF
- Has its SHA-256 hash encrypted and stored as metadata
- Verified during audits, updates, and recovery operations
ShadowLock maintains an encrypted, append-only log ledger that records:
- File creation, modification, and removal events
- Administrative commands and system actions
- Cryptographic HMAC signatures for tamper detection
This design supports post-incident review and forensic analysis.
ShadowLock is designed for Linux systems and relies on:
- Extended file attributes
- Immutable filesystem flags
- Local key management
It is intended for controlled environments and research use. It has not been hardened or audited for production deployment.
Prototype / research project.
MIT