Adobe Commerce and Magento Open Source use an encryption key to protect passwords and other sensitive data. An industry-standard ChaCha20-Poly1305 algorithm is used with a 256-bit key to encrypt all data that requires encryption. This includes credit card data and integration (payment and shipping module) passwords. In addition, a strong Secure Hash Algorithm (SHA-256) is used to hash all data that does not require decryption.
During the initial installation, you are prompted to either let Commerce generate an encryption key, or enter one of your own. The encryption key tool allows you to change the key as needed. The encryption key should be changed regularly to improve security, and at any time the original key might be compromised. Whenever the key is changed, all legacy data is re-encoded using the new key.
For technical information, see Advanced on-premises installation in the Installation Guide.
To change the encryption key, make sure that the following file is writable:
On the Admin sidebar, go to System > Other Settings > Manage Encryption Key.
Do one of the following:
No. Then in the New Key field, enter or paste the key that you want to use.
Click Change Encryption Key.
Keep a record of the new key in a secure location.
It is required to decrypt the data, if any problems occur with your files.