VeraCrypt - Free Open source disk encryption with strong security for the Paranoid

Documentation Security Requirements and Precautions Changing Passwords and Keyfiles

# Changing Passwords and Keyfiles

Note that the volume header (which is encrypted with a header key derived from a password/keyfile) contains the master key (not to be confused with the password) with which the volume is encrypted. If an adversary is allowed to make a copy of your volume before you change the volume password and/or keyfile(s), he may be able to use his copy or fragment (the old header) of the VeraCrypt volume to mount your volume using a compromised password and/or compromised keyfiles that were necessary to mount the volume before you changed the volume password and/or keyfile(s).
If you are not sure whether an adversary knows your password (or has your keyfiles) and whether he has a copy of your volume when you need to change its password and/or keyfiles, it is strongly recommended that you create a new VeraCrypt volume and move files from the old volume to the new volume (the new volume will have a different master key).
Also note that if an adversary knows your password (or has your keyfiles) and has access to your volume, he may be able to retrieve and keep its master key. If he does, he may be able to decrypt your volume even after you change its password and/or keyfile(s) (because the master key does not change when you change the volume password and/or keyfiles). In such a case, create a new VeraCrypt volume and move all files from the old volume to this new one.
The following sections of this chapter contain additional information pertaining to possible security issues connected with changing passwords and/or keyfiles:

- Security Requirements and Precautions
- Journaling File Systems
- Defragmenting
- Reallocated Sectors