2

Can cryptsetup be used to open a veracrypt file like crypsetup can open luks? What is the correct process ?

Want to make sure other software can open veracrypt file , command line or gui is fine, as long as it can open a veracrypt file.


Tried:

$ sudo cryptsetup tcryptOpen '/media/path/to/veracrypt/file' stuff

$ sudo cryptsetup --type --tcryptOpen ''/media/path/to/veracrypt/file' stuff

cryptsetup tcryptOpen '/media/path/to/veracrypt/file' stuff

Thanks to @Vojtech Trefny below command seemed to work but with an error:

~$ sudo cryptsetup --type tcrypt --veracrypt open '/media/path/to/veracrypt/file' stuff

Enter passphrase for /media/...:

Device '/media/path/to/veracrypt/file' is too small.

password was able to open the veracrypt file using veracrypt, but not using cryptsetup....


Additional Note:

This is command allowed me to access veracrypt/truecrypt files using * cryptsetup *

$ sudo cryptsetup --type tcrypt open container-to-mount container-name

kenfavors.com has a simple example page that may be useful to anyone having similar problem described above

t09
  • 51
  • 2
  • 6
  • No, LUKS is totally different format. See https://security.stackexchange.com/a/203675/199910 – Jiri B Mar 10 '21 at 07:44

1 Answers1

3

You are probably mistaking LUKS and cryptsetup. LUKS is a disk encryption format/metadata specification and cryptsetup is a tool (and library) for working with encrypted devices. It was first started for LUKS/dm-crypt but it also supports other formats including TrueCrypt/VeraCrypt, BitLocker and loopaes.

To unlock a VeraCrypt device using cryptsetup use cryptsetup tcryptOpen <device> <name>, details about TrueCrypt/VeraCrypt support are available in the man page, section TCRYPT (TrueCrypt-compatible and VeraCrypt) EXTENSION.

Vojtech Trefny
  • 16,922
  • 6
  • 24
  • 48
  • 2
    Thanks - yes i was confusing cryptsetup with luks........but tried a few different variations of the command you provided, finally ~$ sudo cryptsetup --type tcrypt --veracrypt open to work accepting password, but fails with error Device /media/path/to/veracrypt/file is too small. – t09 Mar 11 '21 at 00:30