• oriond@lemmy.mlOP
    link
    fedilink
    arrow-up
    11
    ·
    edit-2
    11 months ago

    I can’t remember but having my hard drive encrypted, I believe there is a single file that messing with it would render the drive not decryptable.

    • nodsocket@lemmy.world
      link
      fedilink
      arrow-up
      14
      ·
      11 months ago

      The LUKS headers. If those are corrupted you can’t decrypt the drive. The good news is that you can back up the headers to prevent that from happening.

      • waigl@lemmy.world
        link
        fedilink
        English
        arrow-up
        5
        ·
        11 months ago

        Those aren’t files, though, they are just some sectors on your block device. Sure, if you mess with those, your ability to decrypt your disk goes out the window, but then, when was bypassing the filesystem and messing with bits on your disk directly ever safe?

        It’s possible he was using an encrypted key file instead of just a password for that extra strong security. In that case, of course, if you lose that file, kiss your data good bye.

    • oriond@lemmy.mlOP
      link
      fedilink
      arrow-up
      2
      ·
      edit-2
      10 months ago

      Here is the command that will render a LUKS encrypted device un recoverable
      From the documentation.

      5.4 How do I securely erase a LUKS container?

      For LUKS, if you are in a desperate hurry, overwrite the LUKS header and key-slot area. For LUKS1 and LUKS2, just be generous and overwrite the first 100MB. A single overwrite with zeros should be enough. If you anticipate being in a desperate hurry, prepare the command beforehand. Example with /dev/sde1 as the LUKS partition and default parameters:

      head -c 100000000 /dev/zero > /dev/sde1; sync