Background information
Overview: TDE performs data-at-rest encryption at the database layer. This prevents potential attackers from bypassing the database to read sensitive information from storage. After TDE is enabled for your RDS instance, data is encrypted before it is written to a disk and is decrypted when it is read from a disk to the memory. TDE allows authenticated applications and users to access plaintext application data without the need to modify the application code or configurations. TDE prevents operating system (OS) users who attempt to read sensitive information within tablespaces and unauthorized users who attempt to read backup data and on-disk data from accessing the plaintext data.
Key: The key that is used for TDE is created and managed by Key Management Service (KMS). ApsaraDB RDS does not provide the key or certificates that are required for encryption. You can use an automatically generated key. You can also use a custom key and authorize ApsaraDB RDS to access KMS.
Encryption algorithm: After you enable TDE, the encryption algorithm varies based on the MySQL version. The following table describes the mappings between MySQL versions and encryption algorithms:
Database engine | Supported encryption algorithm | Configuration method |
Database engine | Supported encryption algorithm | Configuration method |
MySQL 5.6 | AES_128_ECB
| Not supported |
MySQL 5.7 and MySQL 8.0 | AES_256_CBC , SM4_CTR
| You can use the innodb_encrypt_algorithm parameter to configure an encryption algorithm. For more information, see Modify instance parameters. |
Important
The setting of the innodb_encrypt_algorithm
parameter determines the encryption and decryption algorithms for all encrypted data in the instance, including encrypted tables and logs. If the parameter setting does not match the actual encryption algorithm, the parsing fails. Proceed with caution. Before you change the value of the innodb_encrypt_algorithm
parameter, we recommend that you decrypt all encrypted data, change the encryption algorithm, and then encrypt the data again.