Skip to contentSkip to conversation

How to compress LUKS v2 header?

dm-crypt Julio Cesar Faracco - [email protected] 3 participants 4 messages Dec 26, 2019 – Dec 27, 2019

lore
Share & tools
lore
#0 lore raw

Hi all,

I'm trying to compress a LUKS v2 header file, but I'm not seeing any sensible reduction.
I'm using cryptsetup luksHeaderBackup /dev/sda2 --header-backup-file /tmp/backup.header I used ZIP and GZIP, but I got 0% of reduction of backup.header. :-(
Do you have any suggestions of what algorithm should be used to
compress this type of file?

Thanks!

Signature · 1 line
Julio  Cesar Faracco
#1 lore raw

On 26 Dec 2019 20:20 +0000, from [email protected] (Julio Cesar Faracco - [email protected]):

Quoted 4 lines

I'm using cryptsetup luksHeaderBackup /dev/sda2 --header-backup-file /tmp/backup.header I used ZIP and GZIP, but I got 0% of reduction of backup.header. :-(
Do you have any suggestions of what algorithm should be used to
compress this type of file?

Why are you trying to compress the header backup in the first place?

As a general rule, encrypted data (such as the parts of the LUKS header that aren't already random by design) does not compress well; if data that has been encrypted can be compressed to any notable degree, that usually means the encryption is somehow flawed, because it's leaving patterns in the encrypted data. Properly encrypted data should look completely random, which means that there's very little, if anything, for compression utilities to find reducible patterns in.

Signature · 2 lines
Michael Kjörling • https://michael.kjorling.se • [email protected]
 “Remember when, on the Internet, nobody cared that you were a dog?”
#2 lore raw
In reply to Julio Cesar Faracco - [email protected]

Hi,

compressing the anti-forensic stripes would require breaking some pretty impressive crypto. In short, for all practical purposes, compression is impossible.

Regards,
Arno

Quoted 17 lines · On Thu, Dec 26, 2019 at 21:20:44 CET, Julio Cesar Faracco…

Hi all,

I'm trying to compress a LUKS v2 header file, but I'm not seeing any sensible reduction.
I'm using cryptsetup luksHeaderBackup /dev/sda2 --header-backup-file /tmp/backup.header I used ZIP and GZIP, but I got 0% of reduction of backup.header. :-(
Do you have any suggestions of what algorithm should be used to
compress this type of file?

Thanks!

Signature · 5 lines
Julio  Cesar Faracco
_______________________________________________
dm-crypt mailing list
[email protected]
https://www.saout.de/mailman/listinfo/dm-crypt
Signature · 7 lines
Arno Wagner,     Dr. sc. techn., Dipl. Inform.,    Email: [email protected]
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
#3 lore raw

Hi guys!

Thanks for your answers and sorry to send a lots of cloned emails. I got issues to send for some reason.

Anyway, we have a lab here and we usually save the backup header for security reasons. But after moving to LUKS v2 from v1, header increased from ~1MB to ~22MB.

We would not like to remove some important features introduced by v2.

Signature · 15 lines
Julio  Cesar Faracco

From: dm-crypt <[email protected]> on behalf of Arno Wagner <[email protected]>
Sent: Friday, December 27, 2019 6:30 AM
To: [email protected]
Subject: [EXTERNAL] Re: [dm-crypt] How to compress LUKS v2 header?
    
Hi,

compressing the anti-forensic stripes would require breaking some 
pretty impressive crypto. In short, for all practical purposes,
compression is impossible.

Regards,
Arno
Quoted 17 lines · On Thu, Dec 26, 2019 at 21:20:44 CET, Julio Cesar Faracco…

Hi all,

I'm trying to compress a LUKS v2 header file, but I'm not seeing any sensible reduction.
I'm using cryptsetup luksHeaderBackup /dev/sda2 --header-backup-file /tmp/backup.header I used ZIP and GZIP, but I got 0% of reduction of backup.header. :-(
Do you have any suggestions of what algorithm should be used to
compress this type of file?

Thanks!

--
Julio  Cesar Faracco
_______________________________________________
dm-crypt mailing list
[email protected]
https://urldefense.proofpoint.com/v2/url?u=https-3A__www.saout.de_mailman_listinfo_dm-2Dcrypt&d=DwICAg&c=jf_iaSHvJObTbx-siA1ZOg&r=ZRo7ioNm6-KW9XMwc8-3Aqc6TBVFd8_9yk27A36m0u0&m=UHeTRaj2fJOS8eofLbCuddNDYr5YBFfte5x52g8cOh0&s=whK0QtntH0C5Yob4nwEPjwFCu8n7NZirV09FpwE_pbg&e=

Signature · 11 lines
Arno Wagner,     Dr. sc. techn., Dipl. Inform.,    Email: [email protected]
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
[email protected]
https://urldefense.proofpoint.com/v2/url?u=https-3A__www.saout.de_mailman_listinfo_dm-2Dcrypt&d=DwICAg&c=jf_iaSHvJObTbx-siA1ZOg&r=ZRo7ioNm6-KW9XMwc8-3Aqc6TBVFd8_9yk27A36m0u0&m=UHeTRaj2fJOS8eofLbCuddNDYr5YBFfte5x52g8cOh0&s=whK0QtntH0C5Yob4nwEPjwFCu8n7NZirV09FpwE_pbg&e=