From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from v6.tansi.org (ns.km31936-01.keymachine.de [87.118.116.4]) by mail.server123.net (Postfix) with ESMTP for ; Thu, 24 Dec 2015 07:31:36 +0100 (CET) Received: from gatewagner.dyndns.org (77-57-54-224.dclient.hispeed.ch [77.57.54.224]) by v6.tansi.org (Postfix) with ESMTPA id 0A7E220DC13E for ; Thu, 24 Dec 2015 07:31:36 +0100 (CET) Date: Thu, 24 Dec 2015 07:31:35 +0100 From: Arno Wagner Message-ID: <20151224063135.GA10914@tansi.org> References: <567953A8.9020903@gmail.com> <20151223043004.GD27503@tansi.org> <20151223062318.GA28898@tansi.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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: dm-crypt@saout.de On Wed, Dec 23, 2015 at 23:15:51 CET, .. ink .. wrote: > On Wed, Dec 23, 2015 at 9:23 AM, Arno Wagner wrote: > > > > Hmm. What about actually shifting the partition contents physically? > > > > Or maybe have a dummy-LUKS device, open that, read the master-key > > (see FAQ Item 6.10 ) close it again, and use that master-key > > on a plain device? This is probably far to complex, but could > > serve for experiments. > > > > This actually works and i will go with it,it is actually possible to > get the master key > from a header without first unlocking the device. > > I have a proof of concept code on how to get a master key from a LUKS > volume/header > and then opening a plain dm-crypt device with the master key together > with other options. > > I have used the code to successfully create a LUKS volume header with > a VeraCrypt > master key and then reading the master key from the LUKS header and > create a "correct" > mapper through a plain dm-crypt device. Excellent, that was the idea. The actual dummy-mapping was only for the case that you use the cryptsetup binary, with the library that is not needed. "Plain" as the actual maping for the data-device has the advantage that you get a lot more flexibility. > The code is at: > https://github.com/mhogomchungu/random_stuff/blob/master/cryptsetup.c Thanks for sharing! Reagrds, Arno -- Arno Wagner, Dr. sc. techn., Dipl. Inform., Email: arno@wagner.name GnuPG: ID: CB5D9718 FP: 12D6 C03B 1B30 33BB 13CF B774 E35C 5FA1 CB5D 9718 ---- A good decision is based on knowledge and not on numbers. -- Plato If it's in the news, don't worry about it. The very definition of "news" is "something that hardly ever happens." -- Bruce Schneier