public inbox for dm-crypt@saout.de
 help / color / mirror / Atom feed
From: Milan Broz <gmazyland@gmail.com>
To: Maksim Fomin <maxim@fomin.one>, "dm-crypt@saout.de" <dm-crypt@saout.de>
Subject: Re: [dm-crypt] LUKS2 on disk format
Date: Mon, 11 May 2020 21:58:09 +0200	[thread overview]
Message-ID: <d9467f05-1e69-4f26-950e-4832a43e1bad@gmail.com> (raw)
In-Reply-To: <FZAvYixae2HegYxvSP6meNis1FzQ5yvTT4TOPOeE7xEAbECPaFNztIWX8Q9yRWsD67bThFV1CF3Q6wQchS7FPFjLmO1x6hRVy_gQ3lx3bd8=@fomin.one>

On 11/05/2020 21:07, Maksim Fomin wrote:
> After reading LUKS2 on-disk format specification, I have one main
> question - does LUKS2 data resides entirely on header, which occupies
> first 16 mib (at most) of block device?

Yes, all LUKS metadata are stored in th eLUKS heaer.
But the LUKS header size is configurable (it is not fixed to 16MB,
16MB is just the default size)
(And most of the area is reserved for keyslots, used in online reencryption.)

> Is is safe to assume that
> there is no LUKS metadata somewhere in the middle or in the end of
> the drive?

Yes. There is small exception if you use experimental integrity protection
(authenticated encryption) where dm-crypt is stacked over dm-integrity device.
Then there is dm-integrity superblock in the beginning of data area.
(But this superblovk contains only configuration of dm-integrity metadata;
no LUKS metadata are stored there.
This superblock is required by the kernel dm-integrity implementation.)

Milan

  reply	other threads:[~2020-05-11 19:58 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-11 19:07 [dm-crypt] LUKS2 on disk format Maksim Fomin
2020-05-11 19:58 ` Milan Broz [this message]
2020-05-11 23:15   ` [dm-crypt] FAQ :WAS: " JT
2020-05-12 14:28     ` Arno Wagner
2020-05-12  5:48   ` [dm-crypt] " Maksim Fomin
2020-05-12  9:54     ` Ondrej Kozina
2020-05-12 10:31       ` Maksim Fomin
2020-05-12 11:03         ` Ondrej Kozina

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=d9467f05-1e69-4f26-950e-4832a43e1bad@gmail.com \
    --to=gmazyland@gmail.com \
    --cc=dm-crypt@saout.de \
    --cc=maxim@fomin.one \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox