Setup
Enabling Encryption
1
Enable Encryption
Turn on payload encryption in the Deck Dashboard.
2
Configure Encryption
Choose to encrypt your requests, responses, or both.
3
Find Your Keys
Find your Encryption Key in the API Keys section of the Dashboard.
Configuration Options
You can configure encryption for:- Request encryption: Full payload or input field only
- Response encryption: API responses and webhook payloads
Encryption Modes
Full Payload Encryption
Encrypt the entire request or response payload:encrypted_payload: The encrypted Base64-encoded payload
Input Field Encryption
For/jobs/submit requests, encrypt only the input field:
Implementation
Sending Encrypted Requests
Receiving Encrypted Responses
Decryption
Key Requirements
- Algorithm: AES-256-GCM
- Key: Use the encryption key provided by Deck in the Dashboard
- Format: Base64-encoded encrypted data
- Structure:
nonce + ciphertext + tag(combined and base64-encoded)
Decryption Steps
1
Extract the encrypted payload
Get the
encrypted_payload field from the API response or webhook2
Base64 decode
Decode the base64-encoded encrypted payload to get the raw bytes
3
Split the components
- First 12 bytes: nonce
- Last 16 bytes: authentication tag
- Middle: ciphertext
4
Decrypt using AES-256-GCM
Use your encryption key to decrypt the ciphertext with the nonce and tag
5
Parse the JSON
Convert the decrypted bytes to a string and parse as JSON to get the original data
