Score:0

LUKS Encryption

qa flag

I recently cloned my 250GB disk, installed with Fedora37, encrypted with LUKS. Currently approx. 20 GB disk space is used, the rest is free.

I went ahead and booted from a fedora-live-usb and cloned the disk with dd to an external drive, plus, ive added gzip so i do not end up with an unnessesary big image. Example:

dd if=/dev/sda | gzip -c  > /mnt/<external-disk>/image.img.gz

The cloning+compressing ended with a image size of 12GB. Looks pretty close to what the actual disk usage is (bit smaller).

HERE COMES THE BUT: If the disk is encryped with LUKS, shoulnd it be way bigger as the disk is cloned in a locked state, so the free disk space should not appear as "zero" since even empty disk space should be encrypted?

Or to be more exact: lets assume the 250GB minus the approx. 20GB (=230GB) are not all zeros but all identically, page by page.

Isnt this a huge issue as one could assume so many equal pages may indicate unused space (zero?) and thus be able to crack the encryption easily, since the attacker knows what the raw data are of the empty space, then use the same key for the actual data?

I was expecting a way bigger disk image even with gzip, as "one empty page" should not look equal to gzip "as the next one" and so on!?

Score:1
br flag

Only written data is encrypted, unused data in a LUKS based system is still zeros until used - therefore it's potentially compressible.

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.