Changing a key’s password

You can use the alter encryption key command to change the current password for an encryption key:

alter encryption key [[database.database][owner].] keyname
	[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 Pete, who is Joe’s replacement. The data does not need to be reencrypted 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'