How it works
Environment key creation
When you create an encrypted environment, Tusky generates a symmetric AES-256-GCM key and encrypts it through Seal using the environment’s on-chain access policy. The encrypted key is stored as a managed secret.
Client-side encryption
Before upload, the SDK retrieves the environment key from Seal, encrypts the file locally with AES-256-GCM, then uploads the ciphertext. Plaintext never reaches Tusky servers or Walrus nodes.
Seal as a Key Management Service
Seal is not used to encrypt file data directly — that would be too slow for large files. Instead, Tusky uses Seal as a KMS (Key Management Service): Seal protects the encryption key, AES encrypts the data.| Layer | What | How |
|---|---|---|
| Data encryption | File content | AES-256-GCM with the environment key |
| Key encryption | Environment key | Seal threshold encryption across decentralized key servers |
| Access control | Who can decrypt | On-chain Move policy verified by Seal key servers |
Per-environment keys
All files in an environment share one encryption key. This is both a performance and a security design choice:- Single Seal request per session — the SDK caches the environment key after the first retrieval, so subsequent uploads and downloads require no additional Seal round-trips.
- Batch operations — listing, downloading, or migrating many files only needs one key fetch.
- Sharing is simple — granting access means adding a wallet to the environment’s Seal policy. One policy change covers all files.
Why this is safe
Each file encryption uses a unique random nonce (IV). Even though the same key encrypts every file, AES-256-GCM produces cryptographically independent ciphertexts — this is exactly how AES-GCM is designed to operate. The environment already defines the trust boundary: everyone with access can see all files in it, so the key boundary matches the access boundary. Per-file keys would add no security benefit — the same Seal policy protects the entire environment — while adding significant cost (N Seal round-trips, N on-chain key objects, N policy updates for sharing).The environment key is stored as a managed secret at
tusky/environments/{environmentId}/encryption. You can read it via the Secrets API, but it cannot be deleted manually.Decryption without Tusky
Encrypted blobs live on Walrus and encryption keys are managed by Seal — both are decentralized and independent of Tusky. If Tusky’s API goes down, you can still decrypt your data. What you need:- The encrypted blob — fetch from any Walrus aggregator (Tusky’s, a public one, or your own)
- Seal access — Seal key servers are decentralized and available as long as the Sui network is running
- Your wallet — the Sui wallet authorized in the environment’s Seal policy
SDK with any aggregator
Configure the SDK to fetch from any aggregator — it does not have to be Tusky’s:Manual decryption with Seal directly
For full independence from the Tusky SDK:Sharing encrypted files
Share with specific wallets
Add a member to the environment. Tusky updates the on-chain Seal policy to include the new wallet:Token-gated access (anyone who qualifies)
Gate access on any on-chain condition — no need to add members individually:Policies are composable. Combine NFT ownership, token balance, DAO membership, or custom Move logic for fine-grained access.
Public sharing
For files that should be accessible to anyone with the URL, use a public environment instead. Public environments store unencrypted blobs accessible through any aggregator.Security properties
| Property | Guarantee |
|---|---|
| Zero-knowledge | Tusky never sees plaintext or holds decryption keys. |
| Client-side only | Encryption and decryption happen in your browser or SDK. |
| Wallet-bound | Keys are accessible only through authorized Sui wallets. No passwords. |
| Decentralized keys | Seal distributes key shares — no single point of failure. |
| On-chain policies | Access rules are smart contracts: transparent, auditable, tamper-proof. |
| Tusky-independent | Decryption works without Tusky as long as Seal and Walrus are available. |