You can use the alter encryption key command to change the protection method for an encryption key.
alter encryption key [[database.database][owner].] keyname [with {passwd {'old_passwd' | system_encr_passwd | login_passwd} | master key}] modify encryption [with [{passwd {'old_passwd' | system_encr_passwd | login_passwd} | master key}] [[no] dual_control]]
keyname – identifies a column encryption key.
with passwd 'old_password' – specifies the user-defined password previously specified to encrypt the base key or the key copy with a create encryption key or alter encryption key statement. The password can be up to 255 bytes long. If you do not specify with passwd on the base key, the default is the master key or the system encryption password.
with passwd 'new_password' – specifies the new password SAP ASE uses to encrypt the column encryption key or key copy. The password can be up to 255 bytes long. If you do not specify with passwd and you are encrypting the base key, the default is system_encr_passwd.
system_encr_passwd – is the default encryption password. You cannot modify the base key to be encrypted with the system encryption password if one or more key copies already exist. This restriction prevents the key custodian from inadvertently exposing an encryption key to access by an administrator after the key custodian has set up the key for restricted use by individual users. You cannot modify key copies to encrypt using the system encryption password.
login_passwd – is the login password of the current session. You cannot modify the base key to use login_password for encryption. A user can modify his own key copy to encrypt with his login password.
master key – in the first instance indicates that the current encryption uses the master key. In the second instance, it indicates that the KEK or CEK must be re-encrypted with the master key.
create encryption key key1 with passwd 'MotherOfSecrets'
“razi” shares the password on the base key with “joe” and “bill”, who need to process the encrypted data (no key copies are involved).
“joe” leaves the company.
alter encryption key key1 with passwd 'MotherOfSecrets' modify encryption with passwd 'FatherOfSecrets'
alter encryption key k2 with passwd 'goodbye' modify encryption with master key
alter encryption key k3 modify encryption with master key dual_control
alter encryption key k4 with passwd 'k4_password' modify encryption with passwd 'k4_new_password' no dual_control
alter encryption key k5 modify encryption with passwd 'k5_password' dual_control
create encryption key k6 with passwd 'k6_password' dual_controlFor user “ned”, encrypt his existing key copy of CEK “k6” that is currently encrypted with dual control by the master key and password “k6_password”, for dual control by the master key and password “k6_ned_password”:
alter encryption key k6 with passwd 'k6_password' add encryption with passwd 'k6_ned_password' for user ned
alter encryption key k7 modify encryption with passwd system_encr_passwd no dual control