{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":[]},"type":"markdown"},"seo":{"title":"Encrypting Content (Optional)","description":"Developer documentation for integrating systems that send messages, plus reporting and operational APIs for platform holders."},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"encrypting-content-optional","__idx":0},"children":["Encrypting Content (Optional)"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The Digital Post Platform supports optional client-side encryption of message content before upload."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["When client-side encryption is used, files are encrypted by the sending system before being uploaded to the storage bucket. The encryption key must be provided in the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Create Delivery"]}," request using the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["encryptionKey"]}," field so the platform can decrypt and process the content."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["This mechanism provides an additional security layer on top of transport and storage encryption."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Encryption is optional. Unencrypted files are also supported."]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"overview","__idx":1},"children":["Overview"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["When encryption is enabled:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Files are encrypted before upload"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Encrypted files are uploaded to storage"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["The encryption key is provided in the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Create Delivery"]}," request using the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["encryptionKey"]}," field"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["The platform decrypts files during processing"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Each file is re-encrypted for recipient access"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Encryption applies to:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Message bodies"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Attachments"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Metadata and envelope files are not encrypted."]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"supported-encryption-algorithms","__idx":2},"children":["Supported Encryption Algorithms"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The platform supports the following encryption modes:"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Mode"},"children":["Mode"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Algorithm"},"children":["Algorithm"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Integrity Protection"},"children":["Integrity Protection"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Recommendation"},"children":["Recommendation"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["GCM"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["AES-256-GCM"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Yes"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Preferred"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["CBC"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["AES-256-CBC"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["No"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Legacy"]}]}]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["AES-256-GCM provides authenticated encryption and is the recommended mode."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["AES-256-CBC does not include integrity protection. When CBC is used, a content hash should be provided in the envelope to detect corruption."]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"when-to-use-client-side-encryption","__idx":3},"children":["When to Use Client-Side Encryption"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Client-side encryption may be used when:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Regulatory requirements mandate sender-controlled encryption"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Additional security controls are required"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Content must be encrypted before leaving the sender environment"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["If these requirements do not apply, standard platform encryption is sufficient."]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"file-size-and-encoding-limits","__idx":4},"children":["File Size and Encoding Limits"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Encrypted files must be encoded in chunks."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The following limits apply:"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Parameter"},"children":["Parameter"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Limit"},"children":["Limit"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Maximum chunk size"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["1 MB"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Maximum chunks"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["20"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Maximum encoded file size"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Approximately 20 MB"]}]}]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Files exceeding these limits must be split before delivery."]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"encryption-encoding-format","__idx":5},"children":["Encryption Encoding Format"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Encrypted files must follow a specific binary encoding format."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"encryption-indicator","__idx":6},"children":["Encryption Indicator"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The first byte indicates encryption mode:"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Value"},"children":["Value"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Mode"},"children":["Mode"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["1"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["AES-256-CBC"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["2"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["AES-256-GCM"]}]}]}]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"gcm-chunk-encoding","__idx":7},"children":["GCM Chunk Encoding"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["When using AES-256-GCM, files must be chunked."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Each chunk contains:"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Field"},"children":["Field"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Size"},"children":["Size"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Chunk size"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["4 bytes"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Nonce"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["12 bytes"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Encrypted data"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Variable"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Authentication tag"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["16 bytes"]}]}]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Encoding format:"]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Encryption indicator byte (2)"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Chunk 1"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Chunk 2"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["..."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Chunk N"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Each chunk is encoded as:"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["[Chunk Size][Nonce][Encrypted Data][Auth Tag]"]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"cbc-encoding","__idx":8},"children":["CBC Encoding"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["When using AES-256-CBC:"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Field"},"children":["Field"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Size"},"children":["Size"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Encryption indicator"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["1 byte"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Initialization vector"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["16 bytes"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Encrypted data"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Variable"]}]}]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Encoding format:"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["[Indicator][IV][Encrypted Data]"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["CBC mode does not include authentication tags."]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"encryption-key-handling","__idx":9},"children":["Encryption Key Handling"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["When encrypting files:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["A unique symmetric key must be generated per delivery"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["The same key must be used for all encrypted files in that delivery"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["The key must be securely stored by the sending system"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["The key must be provided in the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Create Delivery"]}," request as the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["encryptionKey"]}," field"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["The key must never be embedded in the file itself"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["If the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["encryptionKey"]}," provided in the delivery request does not match the key used to encrypt the files, the platform will fail the delivery during processing."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Key management is the responsibility of the sending system."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["See ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/getting-started/upload-s3"},"children":["Upload Content to S3"]},". for details about including the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["encryptionKey"]}," field in the delivery request."]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"referencing-encrypted-files-in-envelopes","__idx":10},"children":["Referencing Encrypted Files in Envelopes"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Encrypted files are referenced in envelopes in the same way as unencrypted files."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Example:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n  \"body\": {\n    \"artifact\": {\n      \"name\": \"invoice-880942299.enc\",\n      \"filename\": \"invoice.pdf\"\n    }\n  }\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The platform determines encryption based on file content encoding."]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["AES-256-GCM Reference Implementation (Node.js)"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The following example demonstrates encryption and encoding using AES-256-GCM."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Prerequisites"," ","•\tNode.js"," ","•\tcrypto module"," ","•\tfs module"]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"example-implementation","__idx":11},"children":["Example Implementation"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"javascript","header":{"controls":{"copy":{}}},"source":"const crypto = require('crypto');\nconst fs = require('fs');\n\nconst ALGORITHM = 'aes-256-gcm';\nconst ENCRYPTION_INDICATOR = 2;\nconst CHUNK_SIZE = 1024 * 1024;\nconst MAX_CHUNKS = 20;\n\n// Replace with secure key storage\nconst KEY = crypto.randomBytes(32);\n\nfunction generateNonce() {\n  return crypto.randomBytes(12);\n}\n\nfunction encryptChunk(data, key) {\n  const nonce = generateNonce();\n  const cipher = crypto.createCipheriv(ALGORITHM, key, nonce);\n\n  const encrypted = Buffer.concat([\n    cipher.update(data),\n    cipher.final()\n  ]);\n\n  const authTag = cipher.getAuthTag();\n\n  return {\n    encrypted,\n    nonce,\n    authTag\n  };\n}\n\nfunction encryptAndEncodeData(data, key) {\n  const chunks = [];\n\n  for (let i = 0; i < data.length; i += CHUNK_SIZE) {\n    chunks.push(data.slice(i, i + CHUNK_SIZE));\n  }\n\n  if (chunks.length > MAX_CHUNKS) {\n    throw new Error('File exceeds maximum size');\n  }\n\n  const encodedChunks = chunks.map(chunk => {\n    const result = encryptChunk(chunk, key);\n\n    const size = Buffer.alloc(4);\n    size.writeUInt32BE(\n      result.encrypted.length +\n      result.nonce.length +\n      result.authTag.length\n    );\n\n    return Buffer.concat([\n      size,\n      result.nonce,\n      result.encrypted,\n      result.authTag\n    ]);\n  });\n\n  return Buffer.concat([\n    Buffer.from([ENCRYPTION_INDICATOR]),\n    ...encodedChunks\n  ]);\n}\n\n// Example usage\nconst input = fs.readFileSync('input.pdf');\n\nconst encrypted = encryptAndEncodeData(input, KEY);\n\nfs.writeFileSync('encrypted.bin', encrypted);\n\nconsole.log('Encryption completed');\n","lang":"javascript"},"children":[]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"data-integrity-considerations","__idx":12},"children":["Data Integrity Considerations"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["When using GCM mode:"," ","•\tAuthentication tags verify integrity"," ","•\tCorruption is detected automatically"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["When using CBC mode:"," ","•\tNo integrity verification exists"," ","•\tCorruption may go undetected"," ","•\tHash values should be provided in envelopes"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["GCM is strongly recommended."]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"common-errors","__idx":13},"children":["Common Errors"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The following table lists common encryption related errors and recommended actions."]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Error"},"children":["Error"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Description"},"children":["Description"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Typical Cause"},"children":["Typical Cause"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Recommended Action"},"children":["Recommended Action"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Invalid encoding"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The encrypted file does not follow the required chunk format"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Incorrect chunk structure or missing fields"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Verify chunk size, nonce length, and authentication tag"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Unsupported encryption mode"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The encryption indicator is not recognized"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Invalid first byte in encoded file"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Ensure the correct encryption mode value is used"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Decryption failure"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The platform cannot decrypt the file"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Incorrect encryption key"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Verify that the correct key is provided in the delivery request"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Authentication tag validation failed"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Integrity verification failed (GCM mode)"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Corrupted data or incorrect key"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Regenerate the encrypted file and verify transmission"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Corrupted encrypted content"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["File contents are incomplete or altered"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Transmission error or storage corruption"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Re-upload the encrypted file"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["File size limit exceeded"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Encoded file exceeds platform limits"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Too many chunks or oversized input file"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Split the file or reduce file size"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Duplicate nonce detected"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Nonce reuse detected"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Nonce generation not unique"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Ensure each chunk uses a unique nonce"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Missing encryption key"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["No key provided with delivery"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Misconfigured delivery request"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Include the encryption key in the delivery request"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Invalid hash value"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Content hash does not match decrypted data"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Hash mismatch or incorrect encryption"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Recalculate and update the hash"]}]}]}]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"troubleshooting","__idx":14},"children":["Troubleshooting"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["If encrypted files fail to process:"]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Verify encryption mode indicator"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Verify chunk structure"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Verify key correctness"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Check file size limits"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Validate nonce uniqueness"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Confirm envelope references"]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"next-steps","__idx":15},"children":["Next Steps"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["After encryption is configured, continue with:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Upload Content to Storage"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Create Delivery"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Verify and Troubleshoot"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Monitor Processing Reports"]}]}]},"headings":[{"value":"Encrypting Content (Optional)","id":"encrypting-content-optional","depth":1},{"value":"Overview","id":"overview","depth":2},{"value":"Supported Encryption Algorithms","id":"supported-encryption-algorithms","depth":2},{"value":"When to Use Client-Side Encryption","id":"when-to-use-client-side-encryption","depth":2},{"value":"File Size and Encoding Limits","id":"file-size-and-encoding-limits","depth":2},{"value":"Encryption Encoding Format","id":"encryption-encoding-format","depth":2},{"value":"Encryption Indicator","id":"encryption-indicator","depth":3},{"value":"GCM Chunk Encoding","id":"gcm-chunk-encoding","depth":3},{"value":"CBC Encoding","id":"cbc-encoding","depth":3},{"value":"Encryption Key Handling","id":"encryption-key-handling","depth":2},{"value":"Referencing Encrypted Files in Envelopes","id":"referencing-encrypted-files-in-envelopes","depth":2},{"value":"Example Implementation","id":"example-implementation","depth":3},{"value":"Data Integrity Considerations","id":"data-integrity-considerations","depth":2},{"value":"Common Errors","id":"common-errors","depth":2},{"value":"Troubleshooting","id":"troubleshooting","depth":2},{"value":"Next Steps","id":"next-steps","depth":2}],"frontmatter":{"title":"Encrypting Content (Optional)","description":"Encrypt message files before upload using AES-256 for additional security.","seo":{"title":"Encrypting Content (Optional)"}},"lastModified":"2026-06-04T09:15:15.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/getting-started/encryption","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}