This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CC2745R10-Q1: About the number of times PSA_KeyStore is written

Part Number: CC2745R10-Q1

Tool/software:

I believe that up to 35 keys can be registered in the PSA_KeyStore.

If 34 of those are saved with fixed key information, and the remaining 1 is imported and destroyed for every cryptographic operation to store various key information, how many times is it possible to write?
I would like you to consider the write rotation logic and the physical flash write endurance.

  • Hello,

    You can refer to the datasheet section 7.11 for information regarding the Nonvolatile (flash) memory characteristics. 

    Since you are constantly destroying and writing the key, you must consider typical flash wear. 

    However, you must also consider the key lifetime. For a key that will be constantly imported and destroyed, instead of saving that key with a lifetime that would survive a power cycle, consider using a lifetime that would put the key in RAM instead.

    Best,

    Nima Behmanesh

  • Hi Nima,

    In this case, is the 35th key information always written to the same address on the flash?
    Or is the write position rotated?

  • Hello,

    My apologies, let me be a little more detailed:

    When you import a key with a key lifetime that stores it in the PSA KeyStore, what happens is the following:

    1. All the current keys in the keystore are read and copied from the "active block" to a "scratch block" of memory.

    2. The new key that is imported will be written to the "scratch block" of memory, and then the "scratch block" of memory is marked as the new "active block."

    So, the key won't written to the same address in flash, and it will be rotating between two sectors of memory.

    Though, that's for keys that you want to survive a power cycle and are stored in non-volatile flash. For a key that's going to be destroyed and imported during runtime over and over again, it may be better to keep that key in KeyStore RAM, or even store it the HSM asset store.

    Best,

    Nima Behmanesh