TrustZero is a secure, tamper-resistant data inspection system designed for offline environments. It enables recipients to perform only limited, pre-approved computations on encrypted data using Functional Encryption (FE). The system enforces strict access policies such as one-time installation, device binding, usage limits, and offline-only decryption. It’s ideal for high-security and air-gapped scenarios.
- Delivered as a one-time-use installer (
SecureViewerInstaller.exe) via NSIS. - Prompts for a one-time OTP, verified by
validate_token.exe. - Runs
bind_uuid.ps1to bind the installation to a device UUID. - Stores a hashed UUID in a hidden file (
winmm.dll) underAppData\Microsoft\CLR\Cache. - Installer self-deletes and cannot be reused or copied.
- Fully functional offline post-installation.
- The viewer (
viewer.exe) validates device authorization on launch. - Loads the encrypted dataset (
fe_military.pkl) with FeDDH-based ciphertexts. - Supports FE-decryption for approved inner-product computations only.
- Prevents full data exposure or arbitrary queries.
Pre-defined decryption functions include:
- Total casualties
- Total supplies used
- Total enemy sightings
- Average mission success
- Disrupted communications count
Managed via limit_manager.py, it enforces:
- Maximum runtime (e.g., 60 minutes)
- Limited number of viewer launches (e.g., max 5)
- Function-specific usage limits
- Stores limits in a hidden tracking file (
winmm.dat)
- Device UUID binding
- Usage and runtime limitation
- Obfuscated state files
fe_server.py → Encrypts mission data (CSV) using FE
viewer.py → Secure offline viewer with GUI
validate_token.py → OTP verification at installation
limit_manager.py → Access/runtime tracking logic
bind_uuid.ps1 → Retrieves device UUID
fe_military.pkl → Pickled encrypted dataset
winmm.dll → Hidden UUID auth hash file
winmm.dat → Usage state tracking file
installer.nsi → NSIS script to generate installer
SecureViewerInstaller.exe → Final installer output
python fe_server.pyEnsure you have a viewer.spec and validate_token.spec file ready. To build the .exe:
pyinstaller viewer.spec
pyinstaller validate_token.specThis generates:
dist/viewer/viewer.exedist/viewer/validate_token.exebuild/(intermediate build files)
Make sure any required files (e.g., .pem, .auth, configs) are bundled via the spec.
- Open NSIS > Compile NSI scripts
- Load install.nsi
- Click Compile
- Output: SecureViewerInstaller.exe
Leave the activation server running throughout using the command:
cd activation_server/
python activation_server.pyNow, open the secure activation server at localhost:5000/get_token and enter the pre-approved email-id.
The OTP will be sent to the id.
-
Run SecureViewerInstaller.exe
-
Enter your OTP when prompted
-
Device UUID is bound and .auth files are dropped in hidden location
-
Installer self-destructs after uninstallation to prevent reinstallation or reuse
./viewer.exe-
Performs local, controlled decryption on encrypted data
-
Only pre-approved queries allowed (e.g., totals, averages, thresholds)
-
Fully functional offline, no server or cloud access required
- Military: Decrypt mission-specific stats (casualties, supplies) securely on authorized devices.
-
Python 3.10+
-
PyMIFE (DDH-based FE)
-
cryptography, customtkinter, pyinstaller, NSIS
-
Windows environment recommended
This project is licensed under the MIT License. See the LICENSE file for details.