All of lore.kernel.org
 help / color / mirror / Atom feed
* [dm-crypt] Cryptsetup-reencrypt and data integrity.
@ 2017-03-08 19:55 daniel
  2017-03-08 20:53 ` Michael Kjörling
  2017-03-08 21:30 ` Arno Wagner
  0 siblings, 2 replies; 5+ messages in thread
From: daniel @ 2017-03-08 19:55 UTC (permalink / raw)
  To: dm-crypt

[-- Attachment #1: Type: text/plain, Size: 417 bytes --]

I was playing with cryptsetup-reencrypt recently and I noticed it doesn't do any
integrity checks on re-encrypted data and there is an assumption everything went
fine once the command completes. Are there any plans to introduce integrity
checks in the future? I understanding that verifying large volumes of data would
be a time consuming task but lack of such option may be a show stopper for some
setups.
 
-Daniel-

[-- Attachment #2: Type: text/html, Size: 553 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [dm-crypt] Cryptsetup-reencrypt and data integrity.
  2017-03-08 19:55 [dm-crypt] Cryptsetup-reencrypt and data integrity daniel
@ 2017-03-08 20:53 ` Michael Kjörling
  2017-03-08 22:57   ` daniel
  2017-03-08 21:30 ` Arno Wagner
  1 sibling, 1 reply; 5+ messages in thread
From: Michael Kjörling @ 2017-03-08 20:53 UTC (permalink / raw)
  To: dm-crypt

On 8 Mar 2017 20:55 +0100, from daniel@borek.me.uk:
> I was playing with cryptsetup-reencrypt recently and I noticed it doesn't do any
> integrity checks on re-encrypted data and there is an assumption everything went
> fine once the command completes. Are there any plans to introduce integrity
> checks in the future? I understanding that verifying large volumes of data would
> be a time consuming task but lack of such option may be a show stopper for some
> setups.

How do you propose such integrity checking should be performed?
Remember that a LUKS container may be (at least for all practical
purposes) arbitrarily large. Also, if any inconsistencies are found,
how should the tool respond? At that point, it's not like it can go
back and undo (or redo) what was done.

If this is a showstopper issue for you, there is always the option of
creating a new container and copying the data from one mapped device
to another. (cat /dev/mapper/source > /dev/mapper/target, or more
likely the same with something like ddrescue.) You can then check the
data integrity in any way you like, and handle mismatches in any way
you like.

Or you can take the approach that storage is potentially unreliable
for any number of reasons, many of which completely unrelated to LUKS,
and use something within the container that gives you integrity
checking and recovery capability. Redundant ZFS or Btrfs are probably
good candidates there, but other alternatives exist.

-- 
Michael Kjörling • https://michael.kjorling.se • michael@kjorling.se
                 “People who think they know everything really annoy
                 those of us who know we don’t.” (Bjarne Stroustrup)

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [dm-crypt] Cryptsetup-reencrypt and data integrity.
  2017-03-08 19:55 [dm-crypt] Cryptsetup-reencrypt and data integrity daniel
  2017-03-08 20:53 ` Michael Kjörling
@ 2017-03-08 21:30 ` Arno Wagner
  2017-03-08 22:43   ` daniel
  1 sibling, 1 reply; 5+ messages in thread
From: Arno Wagner @ 2017-03-08 21:30 UTC (permalink / raw)
  To: dm-crypt

Hi Daniel,

as you need to do a backup anyways for this to be safe, it is 
very easy to just verify the backup against the volume after
re-encryption one additional time. 

If you do this without backup, your data is obviously 
non-critical and so errors do not matter....

Regards,
Arno


On Wed, Mar 08, 2017 at 20:55:24 CET, daniel@borek.me.uk wrote:
>    I was playing with cryptsetup-reencrypt recently and I noticed it
>    doesn't do any integrity checks on re-encrypted data and there is an
>    assumption everything went fine once the command completes. Are there
>    any plans to introduce integrity checks in the future? I understanding
>    that verifying large volumes of data would be a time consuming task but
>    lack of such option may be a show stopper for some setups.
> 
> 
> 
>    -Daniel-

> _______________________________________________
> dm-crypt mailing list
> dm-crypt@saout.de
> http://www.saout.de/mailman/listinfo/dm-crypt


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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [dm-crypt] Cryptsetup-reencrypt and data integrity.
  2017-03-08 21:30 ` Arno Wagner
@ 2017-03-08 22:43   ` daniel
  0 siblings, 0 replies; 5+ messages in thread
From: daniel @ 2017-03-08 22:43 UTC (permalink / raw)
  To: dm-crypt, Arno Wagner

[-- Attachment #1: Type: text/plain, Size: 1793 bytes --]

> On March 8, 2017 at 10:30 PM Arno Wagner <arno@wagner.name> wrote:
>
>
> Hi Daniel,
>
> as you need to do a backup anyways for this to be safe, it is
> very easy to just verify the backup against the volume after
> re-encryption one additional time.
>
> If you do this without backup, your data is obviously
> non-critical and so errors do not matter....
 
I'm mainly concerned with situations where there are backups present but still
there's no way to tell that re-encrypted data is actually the same as what was
backed up without doing manual comparisons using hashes, sums etc.

>
> Regards,
> Arno
>
>
> On Wed, Mar 08, 2017 at 20:55:24 CET, daniel@borek.me.uk wrote:
> > I was playing with cryptsetup-reencrypt recently and I noticed it
> > doesn't do any integrity checks on re-encrypted data and there is an
> > assumption everything went fine once the command completes. Are there
> > any plans to introduce integrity checks in the future? I understanding
> > that verifying large volumes of data would be a time consuming task but
> > lack of such option may be a show stopper for some setups.
> >
> >
> >
> > -Daniel-
>
> > _______________________________________________
> > dm-crypt mailing list
> > dm-crypt@saout.de
> > http://www.saout.de/mailman/listinfo/dm-crypt
>
>
> --
> 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
> _______________________________________________
> dm-crypt mailing list
> dm-crypt@saout.de
> http://www.saout.de/mailman/listinfo/dm-crypt

[-- Attachment #2: Type: text/html, Size: 2381 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [dm-crypt] Cryptsetup-reencrypt and data integrity.
  2017-03-08 20:53 ` Michael Kjörling
@ 2017-03-08 22:57   ` daniel
  0 siblings, 0 replies; 5+ messages in thread
From: daniel @ 2017-03-08 22:57 UTC (permalink / raw)
  To: Michael Kjörling, dm-crypt

[-- Attachment #1: Type: text/plain, Size: 2870 bytes --]


> On March 8, 2017 at 9:53 PM Michael Kjörling <michael@kjorling.se> wrote:
>
>
> On 8 Mar 2017 20:55 +0100, from daniel@borek.me.uk:
> > I was playing with cryptsetup-reencrypt recently and I noticed it doesn't do
> > any
> > integrity checks on re-encrypted data and there is an assumption everything
> > went
> > fine once the command completes. Are there any plans to introduce integrity
> > checks in the future? I understanding that verifying large volumes of data
> > would
> > be a time consuming task but lack of such option may be a show stopper for
> > some
> > setups.
>
> How do you propose such integrity checking should be performed?
> Remember that a LUKS container may be (at least for all practical
> purposes) arbitrarily large. Also, if any inconsistencies are found,
> how should the tool respond? At that point, it's not like it can go
> back and undo (or redo) what was done.
 
There are many ways in which data can be integrity can be possibly checked,
including checksums, xors of continuous blocks and others, it's certainly doable
on large scale. Also, assuming we have a backup, all we'd need is the tool to
tell us "oops, something went wrong, go and fix it". Per Arno's email, it's hard
to argue data integrity is a huge concern to you if you don't have backups.

>
> If this is a showstopper issue for you, there is always the option of
> creating a new container and copying the data from one mapped device
> to another. (cat /dev/mapper/source > /dev/mapper/target, or more
> likely the same with something like ddrescue.) You can then check the
> data integrity in any way you like, and handle mismatches in any way
> you like.
>
> Or you can take the approach that storage is potentially unreliable
> for any number of reasons, many of which completely unrelated to LUKS,
> and use something within the container that gives you integrity
> checking and recovery capability. Redundant ZFS or Btrfs are probably
> good candidates there, but other alternatives exist.
 
Don't get me wrong, I'm not trying to lash out at LUKS for not having features
not advertised in its specs and in fact my question isn't LUKS related at all,
it's about cryptsetup-reencrypt only. There are environments with certain
constraints, where there's no file system support (ie RHEL and zfs) or no file
system exists on disk at all. I was mainly curious whether disk integrity as an
additional functionality is something on the horizon for cryptsetup-reencrypt.

>
> --
> Michael Kjörling • https://michael.kjorling.se • michael@kjorling.se
> “People who think they know everything really annoy
> those of us who know we don’t.” (Bjarne Stroustrup)
> _______________________________________________
> dm-crypt mailing list
> dm-crypt@saout.de
> http://www.saout.de/mailman/listinfo/dm-crypt

[-- Attachment #2: Type: text/html, Size: 3381 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2017-03-08 22:57 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-08 19:55 [dm-crypt] Cryptsetup-reencrypt and data integrity daniel
2017-03-08 20:53 ` Michael Kjörling
2017-03-08 22:57   ` daniel
2017-03-08 21:30 ` Arno Wagner
2017-03-08 22:43   ` daniel

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.