You are here:
Bring Your Own Key for Encryption at Rest
Provide your own encryption key to help in encrypting data in Marketing Cloud Engagement. This feature uses an RSA2048 encryption key that you generate in your own environment. Use the key as part of encrypting data at rest using Data at Rest Encryption for a Dedicated Database Environment. This feature applies to the top-level account in your tenant and can’t be activated for individual business units. Perform all operations for this feature in the top-level account of your tenant.
Marketing Cloud Engagement uses account-specific RSA4096 public key pairs and displays the public key to the customer's BYOK setup UI. The corresponding private key is kept inside Salesforce hosted Key Management Service (KMS) and never leaves the KMS boundary. Customers generate an intermediate AES256 key and RSA2048 encryption key, which they import via the BYOK setup UI.
The customer follows a two-step wrapping process to maintain confidentiality of the imported RSA2048 key. The intermediate AES256 key wraps the RSA2048 key. The customer-specific RSA4096 key wraps the intermediate AES256 key.
The customer provides the two wrapped key payloads to import the key. These two payloads are unwrapped inside the key management service. First the intermediate AES256 key with the corresponding RSA4096 private key is unwrapped, and then the imported RSA2048 key with the intermediate AES256 key is unwrapped.
The intermediate AES256 key is discarded and isn't stored. Imported encryption keys are stored in clear text inside the key management service. These keys are marked as non-exportable keys, so only the clear text key is visible to our system. The customer-specific database server sends encrypt and decrypt requests for that key when it needs it.
Data at Rest Encryption uses two-tier key architecture:
- The data encryption key (DEK) managed directly by the database
- The key encryption key (KEK) you provide to encrypt the data encryption key
You can your key to use for key encryption. This key takes the place of generated system keys.
This feature delivers a self-service experience for you to bring your own encryption keys to encrypt data at rest. You can manage the end-to-end lifecycle of your keys, including the import, deletion, and rotation of keys. You can also revoke a key to make all accounts and data in your tenant inaccessible. To regain access to all accounts and data in your tenant, you can restore the key.
When a key is revoked or deleted, it's immediately removed from the Engagement keystore. However, the system can keep a backup copy in accordance with our Marketing Cloud Trust and Compliance Documentation. This copy is deleted after the retention period. Always keep a copy of your key to access encrypted data in Marketing Cloud Engagement. Save this key value in a safe, secure location. You can use only that assigned encryption key to access the data. Otherwise, the encrypted database goes offline and you can’t restore the data from backup. The restoration process can only accept the same key used to originally encrypt the data. Only one key value is active at any time.
The overall process involves these steps.
(1) Generate the RSA encryption key.
(2) Import the encryption key.
(3) The key is active and used in the encryption process.
You can import the key using in Setup or via REST API requests. Make sure that you rotate keys regularly.
The sample commands to generate keys before the import process use an updated version of OpenSSL. You can also perform a similar function using a PKCS#11 interface on keys generated and stored on a Hardware Security Module (HSM) or an Enterprise Key Management (EKM) server.
Anyone with the Admin role can perform tasks related to your encryption keys. Allow these user permissions in the Database Encryption section of User Permissions. Assign each permission individually.
- View
- Rotate Key
- Revoke Key
- Create Your Own Encryption Key
You can create an encryption key in Marketing Cloud Engagement, using multiple keys for the creation and wrapping process. You provide the wrapped version of the Intermediate Key and Private Key. Use Base64 encoding for the wrapped keys before you import them. - Import an Encryption Key
To provision data for encryption at rest, you get a key that's generated by Marketing Cloud Engagement. After you import your own key, perform a key rotation operation to use your newly imported key. - Rotate an Encryption Key in Marketing Cloud Engagement
Follow these steps to rotate your encryption key in Marketing Cloud Engagement for Data at Rest Encryption. This process makes an imported key active and replaces the current encryption key. - Delete an Encryption Key
After you deactivate a key and delete it, Marketing Cloud Engagement removes the key from service immediately. The standard data retention protocol retains the deleted key value for up to 90 days. - Revoke an Encryption Key
When you revoke an active key, Marketing Cloud Engagement deletes the key and you can't log in to your account. Nobody can access the data in your database after revocation. - Restore an Encryption Key in Marketing Cloud Engagement
To import your key value and restore your encryption key, use the Restore application in Marketing Cloud Engagement. Contact your account executive to confirm the correct URL for restoring your encryption key. It can take up to a week to restore a key. You can restore databases up to two weeks after the initial revocation. Databases that remain inactive for more than two weeks cannot be restored. - Validate Your Own Encryption Key
You can perform this process outside of Marketing Cloud Engagement to troubleshoot key wrapping procedures to ensure you used the correct algorithms.

