Changing a key’s password

You can use the alter encryption key command to change the current password for an encryption key using the following syntax. You can use this command on individual key copies. For more information about key copies, see “Accountability and application transparency through key copies”:

alter encryption key [database_name.[owner].] key_name
  [with passwd 'old_password' | system_encr_passwd | login_passwd]
  modify encryption
  [with passwd 'new_password' | system_encr_passwd | login_passwd]

Where:

In this example, the key custodian alters the base key because the password was compromised or a user who knew the password left the company.

  1. Key custodian Razi creates an encryption key:

    create encryption key key1 with passwd 'MotherOfSecrets'
    
  2. Razi shares the password on the base key with Joe and Bill, who need to process the encrypted data (no key copies are involved).

  3. Joe leaves the company.

  4. Razi alters the password on the encryption key and then shares it with Bill, and Joe’s replacement. They do not need to reencrypt any data because the underlying key has not changed, just the way the key is protected. The following statement decrypts key1 using the old password and reencrypts it with the new password:

    alter encryption key key1
    		with passwd 'MotherOfSecrets'
    		modify encryption
    		with passwd 'FatherOfSecrets'