From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-x236.google.com (mail-wm0-x236.google.com [IPv6:2a00:1450:400c:c09::236]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.server123.net (Postfix) with ESMTPS for ; Wed, 23 Dec 2015 13:29:55 +0100 (CET) Received: by mail-wm0-x236.google.com with SMTP id p187so146750438wmp.0 for ; Wed, 23 Dec 2015 04:29:55 -0800 (PST) References: <567953A8.9020903@gmail.com> <20151223043004.GD27503@tansi.org> <20151223062318.GA28898@tansi.org> <567A7C76.5060508@gmail.com> From: Milan Broz Message-ID: <567A93C1.3060203@gmail.com> Date: Wed, 23 Dec 2015 13:29:53 +0100 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [dm-crypt] Variable data offset for a LUKS volume that uses a detached header. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: ".. ink .." , dm-crypt On 12/23/2015 01:10 PM, .. ink .. wrote: >> 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@ink mtz]# cryptsetup luksOpen veraCrypt.img --header=header.img rrr > Enter passphrase for veraCrypt.img: > > [root@ink mtz]# dmsetup table /dev/mapper/rrr > 0 40704 crypt aes-xts-plain64 -master-key- 256 7:0 256 > > [root@ink mtz]# blkid /dev/mapper/rrr > /dev/mapper/rrr: SEC_TYPE="msdos" UUID="706E-EE80" TYPE="vfat" > [root@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] Sure, but activate_by_volume_key can be used here. m.