Hi, I am working on storing data in the Trusted Zone using the PSA APIs.
I tried the Protected Storage (PS) example. When I store data using psa_ps_set() and then read the flash memory with nrfjprog, I see some data that looks encrypted (random bytes). I cannot see the original plaintext.
However, when I use psa_its_set() in the same example and dump the flash, I can see the raw data in plaintext.

-
Why does this happen?
-
Is encryption automatically enabled for Protected Storage (PS)?
-
Do I need to enable encryption for Internal Trusted Storage (ITS) separately?
-
-
I also noticed that when I use
psa_ps_set(), the memory region starts from0xFC00, but the data is not written exactly at the beginning of that region. Could you explain how TF-M organizes storage in flash?
-
I want to store sensitive data (like key pairs, possibly larger than small strings) in the trusted zone. Which method should I use —
psa_ps_set()orpsa_its_set()are any other method?
Could you please point me to documentation that explains how TF-M storage (ITS vs PS) works on Nordic devices?
Thank you.

