If a person finds an old hard drive that was partially overwritten and let's say 1GB of that wasn't and was formerly used for part of a LUKS encrypted partition, what is the risk that such data, which looks random, could be brute force decrypted when the key table is definitely overwritten? Is there anything that a scanning program could find that identifies a 1GB chunk of the LUKS partition as being LUKS encrypted? Is every LUKS disk sector encrypted with the same key, or does it vary based on location? Are pass phrases salted? Are there secondary backup key tables that the attacker could find and exploit?

1 Answer 1


LUKS doesn't encrypt parittions. It just stores metadata and part of the encryption key. If the LUKS portion of the volume is overwritten, the encryption key is lost unless it was backed up somewhere.

The actual volume encryption is not done by LUKS but by dmcrypt.

This, however doesn't invalidate the question. So rephrasing the question, if the (LUKS stored) encryption key for a partition (and some of the partition) has been overwritten, can it be brute forced and decrypted anyway?

The answer to this depends on the strength of the encryption and the strength of the key used for the encryption. If both of these are strong, then it is very unlikely that it can be decrypted unless someone stored the key offline somehow.

Part of the function of LUKS is to store a very large (and thus presumably extremely strong) master encryption key for the volume (up to eight times), but encrypted with a more accessible key. (Each instance of the master key can be encrypted with a different key and/or method.) For example, the master key can be encrypted with a password (weak), a pass phrase (better), tamper resistant TPM hardware (strong), TANG network server (strong), or both TPM and TANG (very strong).

The point of TPM and TANG (coupled with clevis) is to allow the system to automatically release the encryption key (without a manually entered key) if the system hasn't been tampered with, but leave it locked if it has been tampered with or removed from its target network. Typically this would be coupled with a pass phrase that would be used as a backup unlock method.

  • Despite the use of a user-supplied passphrase, isn't it the case that LUKS adds to that passphrase a random salt value that is something like 40 bytes, and which is stored in only one place on the drive such that if that one location is wiped, the chances of brute force decryption are virtually nil? Or is there a backup of the salt somewhere else?
    – ppppppp2
    Commented Jun 14, 2023 at 16:38
  • What does "one place" mean? One copy? One block? One continuous set of blocks? Scattered blocks in a larger contiguous piece? One of each of the 40 bytes in a different block but still only one copy? Does it matter? Yes, if your LUKS header is damaged and you don't have a back up of the encryption key, your data is lost. If it was more important to keep the data than hide it rather than the reverse, perhaps you shouldn't encrypt it.
    – user10489
    Commented Jun 15, 2023 at 1:01
  • What I'm asking is, even if the user chose a passphrase that is only 1 character long, doesn't the random salt that is added to it effectively protect against brute forcing? I ask because hackers such as Elcom Soft claim they can break LUKS. If there were no salt added maybe that could be true. But as far as I know the purpose of the salt is to protect against a weak passphrase. However if hackers know about a backup to the LUKS header somewhere else on the drive such that they could learn the salt, that would let them defeat LUKS.
    – ppppppp2
    Commented Jun 15, 2023 at 2:00
  • LUKS is only as secure as the password you supply. If you give a one character password, I need less than 255 guesses to break it (and on average, likely less than 14 guesses). Salt doesn't make passwords harder to guess, it just makes it so you can't have a dictionary of precalculated hashes to start with, so it will take longer than zero.
    – user10489
    Commented Jun 15, 2023 at 4:26
  • I don't think you're right about that. The point of adding a salt to the end of any passphrase is to ensure the passphrase is robust. The user doesn't know what the salt is or even that it's added. The hackers only know what the salt is if they can find it. If the salt that is in the LUKS header is erased however, and it was random to begin with, hackers wont know what it is. But sure, if LUKS was designed poorly, and the salt wasn't random, or was duplicated elsewhere on the drive, hackers could bypass the issue.
    – ppppppp2
    Commented Jun 15, 2023 at 13:38

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .