Phoenix Protocol is a Windows-first secure file sharing system built for enterprise-style document control. It encrypts files locally, stores only encrypted payloads on the backend, opens content from the Phoenix Inbox, renders plaintext in memory, and enforces policy such as PIN, expiry, geofence, network restrictions, revocation, watermarking, and controlled export.
The project is designed around a governed workflow:
- secure send inside Phoenix
- app-only viewing by default
- remote revocation and continuous session checks
- optional download approval before export
- auditability and attribution for viewer and export activity
Phoenix is not a generic file transfer tool. It is a policy-enforced secure access system.
High-level flow:
- Sender selects a file in Phoenix.
- Phoenix encrypts it locally with hybrid cryptography.
- Phoenix uploads the encrypted wrapper to the backend.
- The sender-side temporary wrapper is destroyed after upload.
- The receiver opens the item from Phoenix Inbox.
- The client requests a short-lived open session from the backend.
- The encrypted payload is fetched and decrypted in memory only.
- The secure viewer renders the plaintext with watermarking and capture shielding on supported Windows builds.
- Hybrid encryption using AES-256-GCM, RSA-4096, and HKDF
- PIN-gated decryption
- Time-to-live expiry
- Optional geofence restrictions
- Optional network/CIDR restrictions
- Remote attestation and revocation checks
- HomeBeacon continuous server reachability / revocation monitoring
- RAM-only viewer path for Inbox opens
- Windows
WDA_EXCLUDEFROMCAPTUREintegration on supported builds - Viewer watermark with user identity, timestamp, and session token
- Controlled export with approval workflow
- Audit logging for security-relevant actions
Phoenix supports three export policies during send:
View onlyDownload with approvalDownload allowed
When Download with approval is selected:
- The receiver requests export from Inbox.
- Phoenix records the business justification.
- The sender reviews the request in the
Approvalstab. - If approved, the backend issues a short-lived export grant.
- The receiver must still enter the PIN.
- Phoenix decrypts in memory and writes a controlled exported copy only after approval.
- Phoenix writes an adjacent export audit manifest for traceability.
This workflow governs exports inside Phoenix. It does not claim to solve every possible out-of-band organisational bypass by itself.
phoenix_desktop1/
├── backend/
│ ├── local_backend.py
│ └── test_backend.py
├── config/
│ └── phoenix_config.json
├── docs/
│ └── TESTING_CHECKLIST.md
├── phoenix/
│ ├── app.py
│ ├── audit_logger.py
│ ├── crypto_engine.py
│ ├── hw_security.py
│ ├── os_integrator.py
│ └── self_destruct.py
├── build.bat
├── main.py
├── requirements.txt
├── test_backend.py
└── README.md
-
phoenix/app.py Main UI, secure viewer, Inbox/Sent/Approvals flows, and audit wiring.
-
phoenix/crypto_engine.py Encryption, decryption, policy parsing, and in-memory payload handling.
-
phoenix/os_integrator.py Windows integration including capture protection, secure key storage helpers, geolocation, and network detection.
-
phoenix/self_destruct.py Secure destruction helpers for protected wrappers.
-
backend/test_backend.py Lightweight development backend for localhost and hosted demo testing.
-
backend/server_backend.py Persistent hosted backend for Render or other server deployment.
It currently provides:
- registration and login
- organisation-scoped user listing
- public key upload
- encrypted payload registration
- Inbox and Sent metadata
- open-session grants
- encrypted payload retrieval
- export approval requests
- export grants and controlled export download
- revocation checks
- audit ingestion
- Windows for the full desktop security experience
- Python 3.12+ recommended
- Reachable backend URL
Dependencies are listed in requirements.txt.
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txtWindows PowerShell:
python -m venv .venv
.venv\Scripts\Activate.ps1
pip install -r requirements.txtEdit config/phoenix_config.json.
For localhost:
{
"mode": "server",
"server_backend_url": "http://localhost:5050"
}For hosted backend:
{
"mode": "server",
"server_backend_url": "https://your-render-service.onrender.com"
}For localhost testing only:
python3 test_backend.pyFor the persistent hosted/server backend:
python3 run_backend.pypython3 main.pyThe test backend ships with:
analyst@corp.com / analyst123reviewer@corp.com / reviewer123
Use the local backend but keep Phoenix in server mode.
- backend URL:
http://localhost:5050 - test login, key generation, send, Inbox open, revoke, expiry
- test download approval flow end to end
Deploy the same backend to Render and switch the URL.
- backend URL: your hosted Render URL
- repeat send/open/revoke/export tests
- validate real HTTPS server behavior
Package the client and test with other users.
- build
Phoenix.exe - distribute to test users
- register same-domain users
- validate multi-device workflow
The Windows build script is build.bat.
Packaging assets:
Build on Windows:
.\build.batTypical output:
dist/Phoenix.exePhoenix-Setup.exewhen NSIS is installed
For release steps and distribution guidance, use docs/RELEASE_CHECKLIST.md.
Before pushing to GitHub:
- Keep
.gitignorein place. - Do not commit generated RSA keys.
- Do not commit backend payload storage.
- Do not commit audit logs or local test data.
- Do not commit local backend URLs that you do not want published.
Recommended first-pass repo workflow:
git init
git add .
git status
git commit -m "Initial Phoenix Protocol commit"Check git status before committing. Make sure local secrets and generated files are not staged.
For Render deployment of the backend:
- deploy the backend service, not the desktop client
- use the persistent hosted backend, not
test_backend.py - use render.yaml or equivalent settings
- point
server_backend_urlto the Render HTTPS URL after deploy
Recommended start command:
gunicorn run_backend:appIf you later split the development backend from a production backend, keep the same API contract used by the client.
These are local/runtime artifacts and should stay out of Git:
- private keys such as
phoenix_private.pem - public/private keypairs generated during local testing
__pycache__/venv/or.venv/- local backend payloads under
data/backend_payloads/ - audit logs such as
.phoenix_audit.jsonl - build outputs such as
build/,dist/, and generated.exe
Phoenix is designed to reduce persistence, tighten access control, and improve attribution. It does not claim that any desktop application can make visible plaintext physically impossible to recapture once a user is allowed to see it.
What Phoenix does well:
- governs secure access inside the application
- avoids ordinary user-managed Inbox downloads by default
- traces viewer and export activity
- supports revocation and policy-bound access
What still requires enterprise governance outside the app:
- DLP / MDM
- approved sharing channels
- device management
- organisational policy enforcement