TEE security: how keys are protected
When you create a Wraith agent, your spending key and viewing key are derived from your wallet signature inside a Phala Network TEE enclave running Intel TDX. The enclave is a hardware-isolated region of memory that the host operating system, hypervisor, and Wraith infrastructure operators cannot read — even with physical access to the server.Intel TDX
Trust Domain Extensions (TDX) is Intel’s hardware virtualization technology that encrypts an entire virtual machine’s memory. Code running inside a TDX trust domain is isolated from the host and from other VMs.
Phala Network
Phala is a decentralized TEE cloud. Wraith runs its agent infrastructure on Phala, which provides remote attestation proving to clients that the correct, unmodified code is running inside the enclave.
- Never touch disk — they exist only in encrypted TEE memory during the lifetime of a request
- Cannot be read by Wraith — the TEE hardware enforces this at the CPU level
- Are deterministic — re-derivable from your wallet signature if you ever need to export them
Remote attestation
When your SDK client connects to the Wraith TEE server, it can request a remote attestation report. This report is a signed statement from the Intel TDX hardware that proves:- The specific code image running inside the enclave
- That the enclave has not been tampered with
- That the hardware attestation is genuine
Exporting keys
If you want to self-custody your keys, you can export them at any time. The export requires a fresh wallet signature proving you still control the owner wallet:Wraith does not log or store exported keys. Once returned to your client, the key is outside TEE protection — store it securely.
Privacy scoring
Stealth addresses protect individual payments from being linked to your identity. But certain patterns across payments can still leak information. The Wraith agent runs a 100-point privacy analysis that scores your stealth address activity and explains what to fix.Scoring algorithm
The score starts at 100 and deducts points for observed risk patterns:| Condition | Deduction | Severity |
|---|---|---|
| More than 5 unspent stealth addresses | −10 | Medium |
| All payment amounts identical | −15 | High |
| Consecutive payments less than 60 seconds apart | −20 | High |
| Never withdrawn any payments | −5 | Info |
| Connected wallet is the agent address | −5 | Info |
Privacy risks explained
Address correlation
When you withdraw multiple stealth addresses to the same destination, an observer can link all those addresses to a single identity — even though each payment arrived privately.Timing analysis
Withdrawing multiple stealth addresses within seconds of each other is a strong signal that they are controlled by the same entity.Amount fingerprinting
Sending identical amounts repeatedly creates a recognizable fingerprint across ostensibly unrelated transactions.Linking on-chain identity
Withdrawing from a stealth address to a wallet tied to your ENS name,.wraith name, or any publicly known address directly links the payment to your identity.
How the agent warns you
The AI agent is privacy-paranoid by design. It intercepts potentially risky actions and explains the consequences before executing:- Warn before risky actions — explains the risk before executing
- Suggest alternatives — recommends fresh addresses, varied amounts, and timing spacing
- Run privacy checks on demand — analyzes your full activity and flags patterns
- Remember context — factors previous risky moves into future advice
- Respect your decision — executes after warning if you choose to proceed
Best practices summary
| Practice | Why |
|---|---|
| Use a fresh destination for each withdrawal | Prevents linking stealth addresses to one identity |
| Space withdrawals at least 1 hour apart | Defeats timing correlation analysis |
| Never withdraw to your connected wallet | Keeps your identity separate from stealth activity |
| Vary payment amounts slightly | Prevents amount-based fingerprinting |
| Use different times of day | Avoids timezone-based profiling |
| Consolidate stealth addresses periodically | Reduces on-chain footprint |
Next steps
What are stealth addresses?
Understand how one-time addresses are generated and why they protect payment privacy.
Wraith agents and identity
Learn how agent identity, .wraith names, and key management work together.

