All of lore.kernel.org
 help / color / mirror / Atom feed
From: Milan Broz <gmazyland@gmail.com>
To: Fourhundred Thecat <400thecat@gmx.ch>, dm-crypt@saout.de
Subject: Re: [dm-crypt] detached LUKS header size
Date: Sat, 23 Nov 2019 09:48:11 +0100	[thread overview]
Message-ID: <c59b2199-e41d-3621-78fb-ae1552dbe607@gmail.com> (raw)
In-Reply-To: <62fc7ef6-e289-b268-17d5-6ac1df2f3904@gmx.ch>



On 23/11/2019 06:43, Fourhundred Thecat wrote:
> Hello,
> 
> I am using full-disk encryption with detached LUKS header.
> 
> The LUKS header file itself is stored on an initrd image which I boot
> from USB, and then I decrypt the cryptsetup partition on my disk and
> chroot into it.
> 
> The initrd system that I boot is very minimal, around 8MB in size.
> 
> The LUKS image, being 2MB, is making the initrd image needlessly bigger.
> 
> And the new LUKS2 format seems to use even larger header (10MB ?)

Please read post to this list
https://marc.info/?l=dm-crypt&m=157146906003981&w=2
and
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=932437#10

If you want, you can decrease size to be even smaller than LUKS1.

> 
>  From what I understand, the keyslots themselves only use up 4KB of
> space, and the rest is used for "antiforensic stripes".
> 
> This is probably a good idea when LUKS header is stored on disk together
> with the cryptsetup partition.
> 
> But when using detached header, which is never stored on disk, this
> makes less sense
> 
> Thus my question:
> 
> is it possible, somehow, to reduce the size of the LUKS header to
> absolute minimum (4KB ?), when I don't need the antiforensic stripes ?

AF is mandatory and must be there, but you can allocate only absolute minimum
for the LUKS2 whole header (for example only area for 1 keyslot), if you do not need other features.

Please see linka above.

If you need smaller header, do not use LUKS, but even VeraCrypt aligns header
to 128k - despite the using only the firsrt sector.
There is more magic than AF related, alignment on storage for example.

Thanks,
Milan

  parent reply	other threads:[~2019-11-23  8:48 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-23  5:43 [dm-crypt] detached LUKS header size Fourhundred Thecat
2019-11-23  8:21 ` Arno Wagner
2019-11-24  6:34   ` Fourhundred Thecat
2019-11-24  8:16     ` Arno Wagner
2019-11-24  8:39       ` Milan Broz
2019-11-23  8:48 ` Milan Broz [this message]
2019-11-25  4:34   ` Fourhundred Thecat
2019-11-25 13:55     ` Milan Broz
2019-11-25 15:17       ` Fourhundred Thecat
2019-11-25 15:27         ` Milan Broz
2019-11-24 11:46 ` Michael Kjörling

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=c59b2199-e41d-3621-78fb-ae1552dbe607@gmail.com \
    --to=gmazyland@gmail.com \
    --cc=400thecat@gmx.ch \
    --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.