Re: How to compress LUKS2 header?

Michael Kjörling <michael-/[email protected]>
Newsgroups gmane.linux.kernel.device-mapper.dm-crypt
Message-ID <xcsvcvspcwrfkq9qvp4d9nqh@localhost>
On 27 Dec 2019 10:56 -0500, from [email protected] (ken):
> Compressing a file is one step in the encryption of that file.  So if
> your LUKS2 header file is encrypted, it's also already compressed. 
> Using ZIP on it would yield no further compression.

No, encryption does not imply compression. Rather, trying to compress
ciphertext is a largely pointless exercise if the encryption is any
good in the first place; therefore, _if_ you're going to compress the
data you're encrypting (keeping in mind that doing so is not always a
good idea; see compression oracle attacks), then you need to compress
first, then encrypt, not the other way around.

I'm pretty sure the LUKS header backup isn't compressed.

-- 
Michael Kjörling • https://michael.kjorling.se • [email protected]
 “Remember when, on the Internet, nobody cared that you were a dog?”

_______________________________________________
dm-crypt mailing list
[email protected]
https://www.saout.de/mailman/listinfo/dm-crypt
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.