Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 5169

General • Re: Procedure for protecting code on Pico 2

$
0
0
That's quite easy to locate where the code checks the key stored in OTP and make it pass the checks, without knowing any keys. All that is needed is to debug the code on other unlocked chip and look where it hangs or access the OTP. You can obfuscate the code, do more checks, but that can turn against you, and the code still remains breakable.

On the other hand, you can encrypt some critical portions of the code which then make it running only from RAM. Or if the code contains a lot of data, but uses only small portions at a time, you can use a buffer in RAM and decrypt just that portion of the data, on the fly in software, when loading it from Flash. Both ways will render the code unusable on any other chip which doesn't have the decryption keys. The signature check is needed to prevent someone else injecting malicious code which can extract the keys from OTP from the original chip.

The simplest solution would be to use internal flash, without any encryption, and lock it to be accessed from outside.
Not sure if it can be done easily (like locking/disconnecting the external OSPI pads) or at all.

Statistics: Posted by gmx — Tue Sep 24, 2024 11:25 pm



Viewing all articles
Browse latest Browse all 5169

Trending Articles