Is there a way to protect sensitive data which is in RAM? Our setup is a microcontroller with no hardware support for security. When there is a need to encrypt data, then the secret key exists in RAM. Even further- plain text exists in RAM. So if anyone can have an access to RAM (e.g. jtag), then the sensitive data is in danger?

  • There was some research with Linux about storing decryption keys in the processor registers (or maybe just cache?) to prevent cold-boot attacks, but I don't know how applicable it would be to a microcontroller.
    – user
    Jan 10, 2020 at 12:54

1 Answer 1


TL,DR: There's no way.

a microcontroller with no hardware support for security.

No hardware support means you need to do all by software, and that means an attacker can use the same software as you. Your data must be decrypted by software, so the attacker can alter your firmware and dump all data, including the keys.

In a microcontroller with security backed by hardware, you can load the keys on a secure enclave, and have this secure component do all the decryption, encryption, and signing. Without hardware support, you cannot protect the keys.

So you have to choose between have security or keep the current microcontroller. You can't have both.

You must log in to answer this question.

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