How to protect PSA Crypto keypair from being overwritten during OTA.

Hi

I am working on a NCS v2.6.0 project that is using PSA Crypto to generate a keypair for each device. The keypair is being stored in persistent storage, but the issue I am having is that the keypair gets erased after the device is OTA'd. I tried making the partition in my board dts file read only, but this did not seem to change anything. The key remains after a simple board reset, but does not after OTA. Any help would be appreicated, thanks! I can provide files if necessary.

Related