Hi everyone, I found the great question on booting encrypted drives, and since I’m somewhat paranoid I’d like to ask a follow-up:

When the key to decrypt the drive is input into the system, I’m assuming it stays in the RAM till the time the computer shuts downs. We know that one could, in theory, get a dump of the contents of the RAM in such a state, if done correctly. How would you deal with this problem? Is there some way to insert the USB, decrypt the drive, and then remove the USB and all traces of the key from the system?

Thanks!


Edit: link to the question I referenced: https://feddit.de/post/6735667

  • sirprize@lemm.ee
    link
    fedilink
    English
    arrow-up
    7
    ·
    1 year ago

    That’s not possible because of the way disk encryption works. When you unlock an encrypted drive, it does not actually decrypt it - that would take way too long and leave the disk unencrypted. Instead, the computer keeps the key in RAM and uses it to decrypt the accessed data blocks on the fly.

  • mumblerfish@lemmy.world
    link
    fedilink
    English
    arrow-up
    3
    ·
    1 year ago

    The key needs to be available to continue to be able to decrypt the data on the device. All encrypted data is not decrypted as you mount or unlock your encrypted device, that is done one the fly as you use it.

    The attack you are thinking of should also not be relevant. What you worry about appears to imply that you are more concerned about the key being protected, rather than the data the key protects. You seem to wish to have your decrypted data available, but not the key.

    • MigratingtoLemmy@lemmy.worldOP
      link
      fedilink
      English
      arrow-up
      2
      ·
      edit-2
      1 year ago

      Thank you, I realise that what I’m asking for might not be physically possible. I’m certain that RAM loses all of its contents after a loss of power, but would it be possible to pad the RAM before/during the shutdown process to make sure that nobody gets to the key?

  • 4am@lemm.ee
    link
    fedilink
    English
    arrow-up
    3
    ·
    1 year ago

    If an attacker wants your encrypted data that bad, they will attack the running machine and use it to access the data, they will not steal a key and then attempt to physically remove the drive.

    Drive encryption is for prevention of access when the drive is offline, it doesn’t protect a running system which can access that data.

    If you are worried about the key being accessed while the machine is running, focus on hardening access to the machine via network, etc.

    • MigratingtoLemmy@lemmy.worldOP
      link
      fedilink
      English
      arrow-up
      1
      ·
      1 year ago

      This machine will not be connected to the Internet, and the only way to get to it would be a VLAN-hopping attack (in which case, I’ll have to think of something else)

  • Kalcifer@sh.itjust.works
    link
    fedilink
    English
    arrow-up
    2
    ·
    edit-2
    1 year ago

    I’m assuming it stays in the RAM till the time the computer shuts downs

    Correct.

    We know that one could, in theory, get a dump of the contents of the RAM in such a state, if done correctly.

    An example of such an attack would a “cold boot attack”.

    Is there some way to insert the USB, decrypt the drive, and then remove the USB and all traces of the key from the system?

    It sort of depends on how the underlying hardware is designed. You can create a system in which the RAM’s contents are encrypted by the hardware, but at some point the data must be decrypted for use. For example, one could theoretically sniff the data-lines between the RAM, and the CPU. This is all of course ignoring the fact that the hardware, itself, could be compromised i.e. Intel M.E., backdoors/vulnerabilities in the BIOS, etc. There’s lots that can be done to try to mitigate security vulnerabilites, but there is always a tradeoff between security, and convenience.

    Maybe the best form of security is memorizing a private key, then manually doing the math with a pen and paper to decrypt some text, and transmit it with a carrier pigeon.

    • surewhynotlem@lemmy.world
      link
      fedilink
      English
      arrow-up
      2
      ·
      1 year ago

      For those not clicking the link, “cryogenically frozen” actually means an upside down can of compressed air.

      • njordomir@lemmy.world
        link
        fedilink
        English
        arrow-up
        1
        ·
        1 year ago

        That was a perfect one sentence summary of the article!

        Its amazing some of the things people come up with like gathering intel on what a computer is doing via power draw changes, monitoring an air-gapped computers electromagnetic fields, or in this case “cryogenically” freezing ram with compressed air.