Available on Enterprise plans.
input and output of every task run in the API responses Deck returns to you, so those values never travel over the wire in plaintext.
How it works
When encryption is on, theinput and output fields on every task run come back as encrypted strings instead of JSON objects. You hold the key and decrypt them client-side.
- Organization-wide and all-or-nothing. The setting applies to your whole organization and encrypts the complete
inputandoutput, not selected fields. For per-field control over inputs, use tokenization instead. - Applies to every task run. Encryption happens at read time, so the setting governs all responses uniformly, including runs that completed before you turned it on. Turning it off returns every response to plaintext.
- The Console always shows plaintext. Only requests authenticated with an API key receive encrypted payloads. Task run details in the Console remain readable.
- API responses only. Encryption applies to task run
inputandoutputin API responses. Inputs and outputs aren’t included in webhook payloads, so webhooks are unaffected.
Enabling encryption
You manage encryption from the Console.Generate an encryption key
Create a named key. Deck shows the full key secret once, at creation. Copy or download it then and store it securely. A lost key cannot be retrieved, only replaced with a new one.
Reading an encrypted task run
With encryption on,input and output are returned as enc_-prefixed strings. Every other field is unchanged.
Envelope format
Each encrypted value is a single string: theenc_ prefix followed by a base64url-encoded, AES-256-GCM payload. The ID of the key used to encrypt the value is embedded in the payload, so you can hold several keys at once and always know which one decrypts a given value.
Decrypting a value
After base64url-decoding the part of the string that follows theenc_ prefix, the bytes are laid out as:
| Bytes | Field |
|---|---|
| 1 | Format version |
| 1 | Key ID length (n) |
n | Key ID, ASCII (for example, enck_Bv7cX1zL5kM9nP3r) |
| 12 | Nonce |
| 16 | Authentication tag |
| variable | Ciphertext |
- Strip the
enc_prefix and base64url-decode the remainder. - Read the embedded key ID and look up the matching key secret from your store.
- Derive the 32-byte AES key by hex-decoding the part of the
ek_live_secret after the prefix. - Decrypt the ciphertext with AES-256-GCM using the nonce and authentication tag.
- Parse the result as JSON.
Rotating keys
Your oldest active key encrypts responses, so creating a newer key changes nothing until you revoke the older one. Rotate with no gap in decryption:- Create the new key and add it to your application’s secrets. Responses still come back on the old key, so nothing breaks yet.
- Revoke the old key to cut over. The new key becomes your oldest active key and starts encrypting — and your application already has it.