[dm-crypt] Variable data offset for a LUKS volume that uses a detached header.

.. ink .. mhogomchungu at gmail.com
Wed Dec 23 13:10:57 CET 2015

> I really do not want to workaround problems in other software by introducing
> hacks in current version of LUKS.

I agree and will probably settle with having a local patched version
of cryptsetup.

Making progress on this front as i can now unlock a volume with
offsets VeraCrypt volumes expects.

[root at ink mtz]# cryptsetup luksOpen veraCrypt.img --header=header.img rrr
Enter passphrase for veraCrypt.img:

[root at ink mtz]# dmsetup table /dev/mapper/rrr
0 40704 crypt aes-xts-plain64 -master-key- 256 7:0 256

[root at ink mtz]# blkid /dev/mapper/rrr
/dev/mapper/rrr: SEC_TYPE="msdos" UUID="706E-EE80" TYPE="vfat"
[root at ink mtz]#

> If you really want this, you can use existing API (open LUKS device/header,
> get volume key, open device again in PLAIN mode and use the parameters).
> Should be few lines of code.

Like i said earlier,PLAIN volumes do not use crypt_format argument for
the master key[1]

[1] https://gitlab.com/cryptsetup/cryptsetup/blob/master/lib/setup.c#L1090

More information about the dm-crypt mailing list