Code security and RAM security

Typically a microcontroller allows the code it runs to be protected against reading and has programming time options to disable debugging. The RP2040 doesn’t have this, it is unable to protect the code it runs or its RAM.

The MCU can execute code either from RAM or directly from flash. You might think you could encrypt the flash and implement a decryptor in software that decrypts the flash into RAM before executing that code. BUT, the RP2040 has no internal memory for the secret key to decrypt it with (so you need to have that key outside of the MCU, unencrypted – pointless) and also the RP2040 can’t be locked down against debuggers, so you can always read the RAM.

For many commercial and security use cases, this makes using the RP2040 in a design a non-starter. Such a shame.

USEFUL?
We benefit hugely from resources on the web so we decided we should try and give back some of our knowledge and resources to the community by opening up many of our company’s internal notes and libraries through mini sites like this. We hope you find the site helpful.
Please feel free to comment if you can add help to this page or point out issues and solutions you have found, but please note that we do not provide support on this site. If you need help with a problem please use one of the many online forums.

Comments

Your email address will not be published. Required fields are marked *