Configuration – encryption
Data encryption can transform data based on encryption rules and encryption algorithms to protect private user data, while data decryption reverses the data encryption process.
In this section, we will present DistSQL statements and examples concerning data encryption alongside the YAML configurations and examples.
DistSQL
Now, let's look at the DistSQL statements:
Create Encrypt Rules
:CREATE ENCRYPT RULE tableName( COLUMNS( (NAME=columnName ,PLAIN=plainColumnName,CIPHER=cipherColumnName, TYPE(NAME=encryptAlgorithmType ,PROPERTIES('key'='value'))) ),QUERY_WITH_CIPHER_COLUMN=true);
To modify the syntax of the encrypt rule, replace CREATE
with ALTER
and keep the other parts unchanged. Here's an example:
CREATE ENCRYPT RULE t_encrypt ( COLUMNS( (NAME=user_name,PLAIN=user_name_plain,CIPHER=user_name_cipher,TYPE(NAME=AES,PROPERTIES ('aes-key-value'='123456abc'))), (NAME=password...