Let's assume, an attacker gains access to an encrypted container with a weak password. They start a brute-force attack and I assume they will succeed. To protect any content which has been added to the container after the leak, I decide to change to a stronger password.

However, at this point, it doesn't make sense to just change the password of the container, right? Won't I have to reencrypt everything since the attacker can extract the "master key" of the container which won't change with a password change?

2 Answers 2


This is correct and to some extent applies even if the container is not leaked yet. If there is any way the attacker may be able to get to the old version of the container (or just its header) for example if you have backups or SSD with wear leveling, it is better to re-encrypt.


The password is used to encrypt the master key, so changing the password will reencrypt the master key, but the master key would be the same. If an attacker has the mater key (from a previous attack), the (current) password is not needed.

So you have to re-encrypt every block of the container, causing a new master key to be used. And (of course) don't encrypt the new master key with the old password that had been found out.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .