cancel
Showing results for 
Search instead for 
Did you mean: 

How can i wipe user key (FUS/WS CKS) when all index positions are used?

dd1
Associate

For storing my crypto key I'm using the following function to store the key in the WB55 core 2 secure key storage:

uint8_t key_index = 1;
    SHCI_CmdStatus_t result;
    SHCI_C2_FUS_StoreUsrKey_Cmd_Param_t CKS_param;
    CKS_param.KeyType = KEYTYPE_SIMPLE;
    CKS_param.KeySize = KEYSIZE_32;
    memcpy(CKS_param.KeyData, key, KEYSIZE_32);
    result = SHCI_C2_FUS_StoreUsrKey(&CKS_param, &key_index);
    DPRINTF("Key stored at index: %d", key_index);

And than loading it into the aes crypto peripheral.

Al works fine until the index reaches the end positions(100 keys).

After that writing a new key will always fail.

I can't find a function to wipe the user key(s).

I there a way to achieve this?

How can i wipe or overwrite a user key?

I think I misunderstand the use of CKS...

1 REPLY 1
STea
ST Employee

Hello @dd1 ,

Sorry for the delayed response. The maximum of keys that can be stored using FUS is 100 as stated in AN5185 (see section 5.1 Key types and structure) +one master clear key used to decrypt other keys if they are stored as encrypted. once stored you cannot neither remove nor update a key this is done to prevent key tampering as explained in this post.

BR

In order to give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.