public inbox for cryptsetup@lists.linux.dev
 help / color / mirror / Atom feed
From: Arno Wagner <arno@wagner.name>
To: "cryptsetup@lists.linux.dev" <cryptsetup@lists.linux.dev>
Subject: Re: [Question] Distinction responsibilities LUKS and dm-crypt
Date: Thu, 31 Mar 2022 20:52:19 +0200	[thread overview]
Message-ID: <20220331185219.GA18410@tansi.org> (raw)
In-Reply-To: <PR3P192MB1087C0EE38951D6391C3B1D5F1E19@PR3P192MB1087.EURP192.PROD.OUTLOOK.COM>

First, dm-crypt is the base-mechanism on block-layer.
There is a "plain dm-crypt" encryption mechanism in 
cryptsetup, sometimes abbreviated as "dm-crypt". 
This ione comes with no meta-data. You enter a paword
and if you do not use the default parameters, you state 
them as well each time you open the device.

LUKS adds a header with metadata, possibilities to use
more passwords and use non-default settings withouth
having to state them each time. But LUKS basically only
does a more elaborate set-up and then passes the actual
work on to dm-crypt. 

I hope that clears up some of the confusuion.

Regards,
Arno




On Thu, Mar 31, 2022 at 20:21:00 CEST, Surmont Jasper wrote:
> Dear, keep in mind I’m fairly new to Linux kernel development and
> similar, so my question might sound stupid. 
>  
> Reading through the documentation of both dm-crypt and LUKS, 
> I understand that LUKS is a format specification 
> to allow FDE, and that dm-crypt is a dm target which allows
> encryption / decryption of writes / reads to the block device. 
> 
> However, I'm unsure about
> what each of these now exactly provides (ie what are the responsibilities). In
> the slides  (look link at the bottom) that the author (Milan Broz) made,
> it mentions that LUKS2 can also provide integrity protection (hence making the
> encryption authenticated). From this, and also reading the Luks1 specification
> I think this is not possible in LUKS1. However, later in the slides it talks
> how dm-crypt allows for authenticated encryption. This is where I'm confused;
> do we assume we use LUKS2? 
> 
> I feel like I'm not really grasping the main function and responsibilities of both LUKS and dm-crypt. 
> Thanks! 
>  
> Slides: https://archive.fosdem.org/2018/schedule/event/cryptsetup/attachments/slides/2506/export/events/attachments/cryptsetup/slides/2506/fosdem18_cryptsetup_aead.pdf 
>  
> Sincerely, Jasper Surmont  

-- 
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

  parent reply	other threads:[~2022-03-31 19:01 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-31 18:21 [Question] Distinction responsibilities LUKS and dm-crypt Surmont Jasper
2022-03-31 18:29 ` Christoph Anton Mitterer
     [not found]   ` <PR3P192MB10874E4159B71C71097583B4F1E19@PR3P192MB1087.EURP192.PROD.OUTLOOK.COM>
2022-03-31 19:32     ` Christoph Anton Mitterer
2022-04-01  8:45       ` Michael Kjörling
2022-03-31 18:52 ` Arno Wagner [this message]
2022-03-31 18:58 ` 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=20220331185219.GA18410@tansi.org \
    --to=arno@wagner.name \
    --cc=cryptsetup@lists.linux.dev \
    /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