2

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
  • 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 '18 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 '18 at 12:03
  • @danielAzuelos No, your guess is not right. – jvkbzowtb Aug 31 '18 at 3:45
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.

  • What do you mean by "should mostly work"? – jvkbzowtb Apr 25 '18 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. – Peter Harmann Apr 25 '18 at 17:29
-1

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.

  • 1
    If the medium does wear leveling, this is untrue. – forest Jul 25 '18 at 12:04
  • Why ? The data itself is encrypted using the key anyway. – Overmind Jul 25 '18 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 '18 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 '18 at 5:35
  • It'd actually be really easy to find it. If you know it's at least somewhere, you can iteratively attempt all address ranges of the correct size and you'll find it pretty soon. Even if you hid a 32 byte random password on a terabyte of random data, you could still find that 32 bytes and use them in short order. – forest Jul 26 '18 at 11:31
-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).

  • 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. – Peter Harmann Apr 25 '18 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 '18 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. – Peter Harmann Apr 25 '18 at 17:42
  • 1
    @Adonalsium no we are not! And it is not even applicable for USBs. Read here: skrilnetz.net/… – Peter Harmann Apr 25 '18 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 '18 at 2:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.