
Oracle Database 12c Security Cookbook
By :

You can change (rekey) a master key and table keys. You cannot rekey tablespace keys.
It is assumed that a keystore is opened and a master key is created.
Connect to the database as a user who has administer key privilege or SYSKM
privilege (for example, maja
):
$ sqlplus maja
To rekey a table (for example, the oe.customer
) using a different encryption algorithm (for example, AES128), execute the following statement:
Figure 24 - Rekeying a table key
Change a master key by executing the following statement (in our example, keystore_password
is welcome1
):
SQL> ADMINISTER KEY MANAGEMENT SET KEY IDENTIFIED BY
keystore_password
WITH BACKUP;
Figure 25 - Rekeying a master key
When you changed a table key, in step 2, all encrypted data in the oe.customers table were decrypted and then encrypted using the new table key and the new encryption algorithm. If you just want to change key and use the same algorithm as before, syntax for rekeying is...