2.12 Ensure AES Encryption Mode for AES_ENCRYPT/AES_DECRYPT is Configured Correctly

Information

A block encryption mode with a Cipher Block Chaining (CBC) mode value and key length of 256 is recommended when using the AES_ENCRYPT() and AES_DECRYPT() functions for encryption.

Rationale:

The default for backward compatibility on upgraded MySQL databases is aes-128-ecb. Using 128-bit keys does not provide sufficient security. Regardless of whether breaking the lowest level is beyond existing technology, larger key sizes are needed to better protect data and satisfy regulations.

Impact:

Configuring a key length of 256 may impact backwards compatibility.

Solution

Add the following lines to the MySQL server's /etc/my.cnf:

For example, if Block Encryption Mode for aes-256 CBC

block_encryption_mode=aes-256-cbc

Or, run the following command:

set persist block_encryption_mode='aes-256-cbc';

Restart the server for this change to take effect.

Default Value:

aes-128-ecb

See Also

https://workbench.cisecurity.org/benchmarks/15112

Item Details

Category: SYSTEM AND SERVICES ACQUISITION

References: 800-53|SA-15, CSCv7|18.5

Plugin: MySQLDB

Control ID: f189c1cffc978ca8821b70fb411b9fc2177cb91d94a0c5e6d45c22718e30dffb