What Is a TEE?
A TEE is a hardware-isolated compute environment. Code and data inside the enclave are protected from the host operating system, hypervisor, and even the hardware operator. Intel TDX (Trust Domain Extensions) provides:- Memory encryption — data in enclave memory is encrypted at the hardware level
- Code integrity — the enclave can prove it’s running specific, unmodified code
- Remote attestation — clients can verify the enclave’s identity and integrity remotely
Key Derivation
Agent keys are derived deterministically from the TEE’s hardware root secret. They are never stored — re-derived on demand for every operation.Derivation Path
Implementation
Per-Chain Key Derivation
The chain connector determines how the raw seed becomes usable keys:| Chain | Curve | Flow |
|---|---|---|
| EVM | secp256k1 | seed → SHA-256 → privateKeyToAccount → sign message → deriveStealthKeys → st:eth:0x... |
| Stellar | ed25519 | seed → SHA-256 → ed25519 seed → sign message → deriveStealthKeys → st:xlm:... |
Security Properties
Keys Are Never Stored
Every time an operation needs agent keys (sending a payment, scanning, withdrawing), the keys are re-derived from the TEE root secret. No private key material touches disk.Wallet Ownership Verification
Agent creation requires an EIP-191 signature (EVM) or ed25519 signature (Stellar) from the owner wallet. This proves the creator controls the wallet without revealing any private key.Key Export
Exporting an agent’s private key requires a fresh wallet signature:Remote Attestation
Clients can verify the TEE is running authentic, unmodified code:- The code inside the TEE matches the published source
- Keys were derived by the legitimate Wraith software
- No unauthorized modifications have been made
Privacy Properties
Stealth Addresses
Every payment goes to a fresh one-time stealth address. On-chain observers see random addresses with no link to the sender or receiver.View Tags
View tags enable efficient scanning. Each announcement includes a 1-byte tag derived from the shared secret. The recipient can reject ~255/256 non-matching announcements by checking just the tag — without computing the full stealth address.AI Privacy Guardian
The agent proactively monitors for privacy risks:- Timing analysis — warns if transactions happen too close together
- Amount patterns — flags identical payment amounts
- Address correlation — warns about withdrawing to a known wallet
- Consolidation risk — alerts when too many stealth addresses are unspent
Deployment
Docker
linux/amd64 for TEE hardware compatibility.
Environment Variables
| Variable | Description |
|---|---|
DATABASE_URL | PostgreSQL connection string |
GEMINI_API_KEY | Default AI model key |
DEPLOYER_KEY | Key for deploying contracts / funding agents |
CHAIN_ID | Target chain ID |
RPC_URL | Chain RPC endpoint |
Deploy to Phala
/var/run/dstack.sock) connects the container to the TEE hardware for key derivation.
