0

Consider the following scenarios of storing sensitive data locally on a network connected always-on device:

  1. without any data encryption whatsoever
  2. with encryption, the key stored locally in the device
  3. with encryption, the key stored on a remote location accessible via network

No matter where the key is stored, once the attacker gets physical access to the device, they can obtain the key and decrypt the data. Does storing the encryption key remotely provide any advantage in terms of data security, or are all three scenarios effectively equivalent?

8
  • What kind of data is encrypted? For what purpose? Is it full disk encryption? Is it an encrypted container mounted as storage? Is it decrypted at boot and subsequently accessible by the entire system? – svin83 Feb 8 at 18:37
  • @svin83 let's consider binary data on an encrypted partition mounted and decrypted at boot, but I do not consider these variables to be too significant – peter.babic Feb 8 at 18:49
  • Decrypted at boot is essentially the same as clear text as long as the computer is running... If it is decrypted only when in use and then re-encrypted immediately after use, it is something completely different... – svin83 Feb 8 at 19:10
  • I think the answer depends on what are the powers that your adversary can have? If an adversary can get a memory dump during the decryption process, then its pointless where you store the key. – Limit Feb 8 at 23:58
  • @svin83 immediate re-encryption would be possible, I did not consider this scenario. But, I cannot see how much is it different. If the attacker grabs the device, probably has the key as well, or not? – peter.babic Feb 9 at 12:43
1

Keeping the key on the device is your best option if you have a secure place to put it. Network transport provides a much larger attack surface, even if you use TLS to transfer the key.

The usual problem is that with physical access you can easily dump the key by dumping firmware. Many embedded systems handle this with a secure key storage peripheral, either using an on-chip feature like ARM TrustZone, or an off-chip device such as Microchip's CryptoAuthentication ICs. This then acts as an oracle that can perform operations using that key (with certain defined restrictions) without ever revealing it.

Implementing this safely in practice is extremely difficult, though. It is often possible to break a lot of on-chip security features either through misconfiguration, bugs, or glitching attacks on the ICs themselves.

2
  • Thank you for the answer. Could you please add a little bit information about TPM? My currently limited research tells me it is a little bit related. – peter.babic Feb 9 at 12:37
  • 1
    @peter.babic A TPM is a trusted platform module. They're common on x86 platforms (you probably have one in your computer) and they have a similar role to what I described above, but they have a significantly greater function set than just key storage. They implement things like Secure Boot, measured boot and attestation, platform integrity validation, and HRNG / key generation. – Polynomial Feb 9 at 14:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.