Loading...
Searching...
No Matches
PSA Crypto Persistent Storage API

Detailed Description

Files

file  psa_crypto_persistent_storage.h
 

Functions

psa_status_t psa_write_encoded_key_slot_to_file (psa_key_id_t id, uint8_t *input, size_t input_len)
 Writes a CBOR encoded key slot to a file.
 
psa_status_t psa_read_encoded_key_slot_from_file (psa_key_id_t id, uint8_t *output, size_t output_size, size_t *output_data_len)
 Reads a CBOR encoded key slot from a file.
 
psa_status_t psa_destroy_persistent_key (psa_key_id_t key_id)
 Destroy a key in persistent storage.
 

Function Documentation

◆ psa_destroy_persistent_key()

psa_status_t psa_destroy_persistent_key ( psa_key_id_t  key_id)

Destroy a key in persistent storage.

Note
This will only remove the link to the key file without erasing the key from the flash. The key material can still be recovered by someone with access to the hardware.
Parameters
key_idID of the key to be destroyed
Returns
psa_status_t

◆ psa_read_encoded_key_slot_from_file()

psa_status_t psa_read_encoded_key_slot_from_file ( psa_key_id_t  id,
uint8_t *  output,
size_t  output_size,
size_t *  output_data_len 
)

Reads a CBOR encoded key slot from a file.

Parameters
idID of the desired key
outputOutput buffer to write CBOR data to
output_sizeSize of output buffer
output_data_lenActual length of CBOR encoded data
Returns
psa_status_t

◆ psa_write_encoded_key_slot_to_file()

psa_status_t psa_write_encoded_key_slot_to_file ( psa_key_id_t  id,
uint8_t *  input,
size_t  input_len 
)

Writes a CBOR encoded key slot to a file.

Parameters
idID of slot, used as filename
inputPointer to CBOR encoded data
input_lenLength of CBOR encoded data
Returns
psa_status_t