4

Is it safe to create a Veracrypt partition (on a USB) such that

  • it takes up the whole device (ie. not a "file", but using the USB as the storage container)
  • it contains only a standard volume (no hidden volume)
  • it uses a weak password (eg. 123456)
  • it is quick formatted (ie. not overwritten with garbage)
  • no one obtains the volume header during this time (while the weak password is in use)

I then easily mount and dismount the Veracrypt container adding files. After I am done (eg. after a few days or a week), I change the volume password (eg. from 123456 to Zdbze5CVPFTPUrPbxzM4GG3N8sTnAktRRcFyYftkdWsUg).

I am concerned that by initially using a weak password then changing it to a sufficiently strong password, the security is reduced.

In particular, if an attacker tries to recover the volume header (of the weak password) from the start and end of the partition, they can use either the complex password (Zdbze5CVPFTPUrPbxzM4GG3N8sTnAktRRcFyYftkdWsUg) or the weak password (123456) to unlock the Veracrypt container.

3

Generally the master key is encrypted (wrapped) using the password. If this wrapped key is overwritten by the same key wrapped with the secure password (using password based encryption, as Veracrypt uses) then the result should be secure.

The problem with flash based storage is that it may not actually overwrite the password but write it to another page (because of wear leveling). Direct access to the flash may then be used to retrieve the old wrapped password, and a brute force attack could then be used to retrieve the master key. This will not be easy to do, but it isn't impossible.

More information in this answer.

  • Then what if I do not initially do a quick format, but a full format? (so that all bits on the device appear to be random such that it is not plausible to try all subset as the volume header)? (since volume header may be stored anywhere due to wear-levelling) – jvkbzowtb Apr 25 '18 at 16:45
  • A full format is never a good idea on a flash device. If you have an SSD then you can probably perform a SATA secure erase instead (there is an identical function on NVMe SSD's, I think). But as you only change the passwords after putting the data on the SSD it won't matter much. Note that flash devices commonly have spare pages of flash for the wear leveling, the full format may therefore not destroy all data! Actually, same for HDD's, as damaged sectors may be replaced by spare ones internally. And secure erase is way faster even on HDD's than a full format. – Maarten Bodewes Apr 25 '18 at 16:48
  • The chances that the data is moved to another sector because of damage is way lower on HDD's. And I presume that Veracrypt will try and write the data at the same location (it's kind of hinted that way, but I didn't perform a code review). So don't do this on a HDD with many SMART errors (but you'd toss that HDD in the bin anyway, right?) – Maarten Bodewes Apr 25 '18 at 16:52
  • Note that many cheap USB sticks won't do too much wear leveling, but unfortunately you'll never know what they do, so... – Maarten Bodewes Apr 25 '18 at 16:55
0

Assuming the old header is properly rewritten, it is safe. But especially on a USB flash device (also SSDs), this assumption is likely not true because of wear-leveling. So I would recommend strongly against this.

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.