public inbox for cryptsetup@lists.linux.dev
 help / color / mirror / Atom feed
* Unlock a Veracrypt/Truecrypt partition which uses a keyfile with a passphrase from /etc/crypttab
@ 2023-08-22  9:31 Kent Larsson
  2023-08-22  9:37 ` Arno Wagner
  2023-08-22 10:00 ` Milan Broz
  0 siblings, 2 replies; 6+ messages in thread
From: Kent Larsson @ 2023-08-22  9:31 UTC (permalink / raw)
  To: cryptsetup

Hi! I have a Veracrypt (/Truecrypt) volume, which I can successfully
unlock manually by providing a key file and passphrase:

    # cryptsetup --type tcrypt --key-file /.keyfile open /dev/nvme0n1p5 shared
    Enter passphrase for /dev/nvme0n1p5:

Only root has `rw` on the key file, a binary file of 64 bytes.

    # ls -l /.keyfile
    -rw------- 1 root root 64 aug 21 08:09 /.keyfile
    # file /.keyfile
    /.keyfile: data
    # du -b /.keyfile
    64 /.keyfile

Is there a way to unlock a Veracrypt (/Truecrypt, `/dev/nvme0n1p5` in
my case) partition that uses a key file with a password in
`/etc/crypttab`?

I have tried constructing a file with the structure
`{passphrase}{newline}{key file contents}` and manually using it to
unlock as above, but I still got the passphrase question. To create
that file, I did the following:

    # echo 'mypassword' > /.keyfile_psw
    # cat /.keyfile >> /.keyfile_psw

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2023-08-22 10:16 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-22  9:31 Unlock a Veracrypt/Truecrypt partition which uses a keyfile with a passphrase from /etc/crypttab Kent Larsson
2023-08-22  9:37 ` Arno Wagner
2023-08-22 10:01   ` Milan Broz
2023-08-22 10:09     ` Arno Wagner
2023-08-22 10:16       ` Milan Broz
2023-08-22 10:00 ` Milan Broz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox