All of lore.kernel.org
 help / color / mirror / Atom feed
From: Milan Broz <gmazyland@gmail.com>
To: dm-crypt@saout.de
Subject: Re: [dm-crypt] Offset/size issue during LUKS recovery.
Date: Fri, 15 Jul 2016 13:12:30 +0200	[thread overview]
Message-ID: <3bf87426-e4fe-3032-a649-779a510b29d2@gmail.com> (raw)
In-Reply-To: <20160715091351.GA28512@tansi.org>

On 07/15/2016 11:13 AM, Arno Wagner wrote:
> On Fri, Jul 15, 2016 at 02:52:35 CEST, Julio Cesar Faracco wrote:
>> Hi,
>>
>> Since I moved to the version 1.6.7 of cryptsetup, I started to have some problems to recovery a LUKS partition
>> using a LUKS header file and a valid passphrase.
>>
>> # cryptsetup luksDump my_header_file --debug
>> # Detected kernel Linux 3.10.0-327.13.1.el7.x86_64 x86_64.
>> # Reading LUKS header of size 1024 from device /tmp/my_header_file
>> # Key length 64, device size 8192 sectors, header size 4036 sectors.
> [...]
>> # # cryptsetup luksOpen /dev/loop0 my_enc_partition <<EOF
>> $(PASSWORD)
>> EOF
>> # Detected kernel Linux 3.10.0-327.13.1.el7.x86_64 x86_64.
>> # Reading LUKS header of size 1024 from device /tmp/my_header_file
>> # Key length 64, device size 4060 sectors, header size 4036 sectors.
> 
> I take it, the device is  8192 sectors, i.e. 4MB? 
> 
> If so, there seem to be a bug in device-size detection
> as used by luksOpen.

libcryptsetup uses  BLKGETSIZE64 ioctl as all other tools, so more likely is that
device-size is really 4MB :)

But if separate header is used then the debug output above mean device (or file image) size for the header image,
not the data device

I should probably change wording in this message...

Milan

  reply	other threads:[~2016-07-15 11:12 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-15  0:52 [dm-crypt] Offset/size issue during LUKS recovery Julio Cesar Faracco
2016-07-15  7:33 ` Milan Broz
2016-07-15  9:13 ` Arno Wagner
2016-07-15 11:12   ` Milan Broz [this message]
2016-07-15 13:13     ` Arno Wagner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3bf87426-e4fe-3032-a649-779a510b29d2@gmail.com \
    --to=gmazyland@gmail.com \
    --cc=dm-crypt@saout.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.