3

How can I change a Veracrypt (master) password efficiently and securely?

Based on the answers here, it is not safe to use system --> change password due to various reasons.

I cannot simply image the device to my hard drive as it does not use FDE (I am in the process of moving towards full encryption); doing so would allow attackers to get the master key that is encrypted with a weak password from the hard drive (rather than from the device that will use a complex password).

The best solution I have come up with so far is to:

  • create a Veracrypt container on the hard drive using a strong one-time password (that is used to temporarily store the image of the device)
  • image the device and store in temporary Veracrypt container
  • delete old Veracrypt partition (with a weak password)
  • create a new Veracrypt partition on top (with a complex password)
  • move files from image to new Veracrypt partition
3
  • Is it right to guess the major risk you want to fight are the blocks stored unencrypted outside of your weak Veracrypt container because of the normal behaviour of your operating system? If my guess is right, please clarify your purpose in your original question.
    – dan
    Aug 24, 2018 at 11:59
  • Your disk is full of leaks "unencrypted"? Depending on your disk driver, and your disk firmware, some of them aren't reachable now.
    – dan
    Aug 24, 2018 at 12:03
  • @danielAzuelos No, your guess is not right.
    – jvkbzowtb
    Aug 31, 2018 at 3:45

3 Answers 3

0

Your solution should work well enough and I believe it is the best one possible currently without destroying the USB flash drive. The problem is that the old container may leave remnants for the same reasons, why it is insecure to change the password. Namely wear-leveling.

If these remnants include the header, the attacker may be able to retrieve some files, that were not overwritten. If you are really really serious about having the data 100% secure, you should put the new container on a new flash-stick and properly destroy the old one with the container with weak password.

Alternatively, as ThoriumBR mentioned, you may decrease the chance of the remnants surviving by writing random data to the flash drive (for example making largest possible empty VeraCrypt volume and also choosing the secure deletition). This does not guarantee the data will be destroyed properly, but it increases the chance somewhat. Repeated writing to the flash memory will however lower its life-expectancy, so the flash drive will be more likely to fail.

2
  • What do you mean by "should mostly work"?
    – jvkbzowtb
    Apr 25, 2018 at 17:27
  • @jvkbzowtb Well, I described the caveat. The header of the old container may survive as well as parts of the old container. If the header survives, it should be possible for the attacker to decrypt the surviving parts of the old container and obtain the data on them. Apr 25, 2018 at 17:29
0

Security is not reduced if you change the weak password with a strong password compared to using a strong password in the first place.

Both weak and strong passwords unlock your volume/container key which is then used for volume/container access.

The key has the same strength. The fact that you use a strong password to access it is fine and unrelated to the previously weak password.

11
  • 2
    If the medium does wear leveling, this is untrue.
    – forest
    Jul 25, 2018 at 12:04
  • Why ? The data itself is encrypted using the key anyway.
    – Overmind
    Jul 25, 2018 at 12:19
  • 1
    Because the master key is encrypted with the weak key, and if you change the password on a system with wear leveling, it won't overwrite the weakly encrypted master key.
    – forest
    Jul 25, 2018 at 12:44
  • True, but it's highly unlikely that you find that weakly encrypted key just from wear-leveling junk.The key is just some random data with no specific tag to be identified with.
    – Overmind
    Jul 26, 2018 at 5:35
  • 1
    Wear leveling is a bugaboo of little reality. None of the standard forensic labs are capable of doing anything with it. A specialty lab capable of doing Chip-Off work to bypass the wear leveling controllers to get to the swapped memory would be very very expensive. Even then, trying to correlate the dissociated tiny memory fragments with useful content is yet another Herculean undertaking. Wear leveling is simply not a realistic threat. Aug 13, 2020 at 23:21
-2

You can just create another container with a strong password, copy all files from the weak encrypted container to the new, and secure-delete the older one.

If your disk is a SSD, secure delete will not work because of wear leveling. In this case, you could create a very large file full of zeroes to fill up the disk, delete it, fill up again. Every time you do that, you decrease the chance of recovering the original headers (and decrease the lifespan of your device).

8
  • There is no way to actually ensure the proper deletion of flash memory, please don't promote approaches, that mask the problem without solving it. Apr 25, 2018 at 17:30
  • Note that I said decrease the chance. I never said it will ensure deletion. I know the only way to ensure deletion is physical destruction, but that is really needed in very, very few cases.
    – ThoriumBR
    Apr 25, 2018 at 17:33
  • Even so, not everyone here will go and search for one exact word used. Critical things like these need to be emphasized. Apr 25, 2018 at 17:42
  • 1
    @Adonalsium no we are not! And it is not even applicable for USBs. Read here: skrilnetz.net/… Apr 25, 2018 at 18:10
  • 1
    Creating a large file full of zeros and deleting it will not wipe an SSD, due to overprovisioning.
    – forest
    Jun 25, 2018 at 2:30

You must log in to answer this question.

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