Security
Treeship is designed with a trust-minimized security model. You don’t need to trust us—you can verify everything independently.Cryptographic Foundations
Ed25519 Signatures
All attestations are signed with Ed25519, a modern elliptic curve signature scheme:- Fast: ~70,000 signatures/second on modern hardware
- Secure: 128-bit security level, no known practical attacks
- Deterministic: Same inputs always produce the same signature
- Widely supported: Available in every major language
SHA256 Hashing
Payloads and input data are hashed with SHA256:- Collision resistant: Computationally infeasible to find two inputs with the same hash
- One-way: Cannot reverse a hash to get the original data
- Deterministic: Same input always produces the same hash
Canonical JSON
Before signing, payloads are serialized to canonical JSON:- Keys sorted alphabetically
- No whitespace
- Consistent number formatting
Trust Model
Independent Verification
Anyone can verify any attestation without contacting Treeship:- Fetch the public key once (or pin it in your code)
- Get the attestation (from us, from the agent, from anywhere)
- Verify locally using any Ed25519 library
API Key Security
Key Format
API keys use the format:ts_live_ + 32 random bytes (base64)
- Prefix: Identifies key type and prevents accidental exposure in logs
- Entropy: 256 bits of randomness (cryptographically secure)
- Storage: Only the SHA256 hash is stored server-side
Best Practices
Environment Variables
Never hardcode keys. Use
TREESHIP_API_KEY environment variable.Key Rotation
Create new keys periodically. Revoke old ones immediately if compromised.
Separate Environments
Use different keys for dev, staging, and production.
Least Privilege
Don’t share keys between services that don’t need them.
If Your Key Is Compromised
- Revoke immediately:
DELETE /v1/keyswith the compromised key - Generate new key: Request a new verification code
- Audit: Check recent attestations for unauthorized activity
- Update: Deploy new key to all services
Data Privacy
What We Store
| Data | Stored | Notes |
|---|---|---|
| Action descriptions | Yes | You control the content |
| Input hashes | Yes | Only the hash, not the data |
| Timestamps | Yes | UTC, millisecond precision |
| Metadata | Yes | Optional, you control content |
| Signatures | Yes | Public, verifiable |
| API key hashes | Yes | Not the actual keys |
| Email addresses | Yes | For key recovery only |
What We Don’t Store
- Your actual input data (only hashes)
- Plaintext API keys
- Agent source code or configurations
- Any data you don’t explicitly send
Data Location
- API hosted on Railway (US regions)
- Database encrypted at rest
- HTTPS required for all connections
Reporting Security Issues
Found a vulnerability? Email security@treeship.dev with:- Description of the issue
- Steps to reproduce
- Potential impact