Mbed OS Reference
Loading...
Searching...
No Matches
storage_common.h File Reference

This file includes common definitions for PSA storage. More...

#include <stddef.h>
#include <stdint.h>
#include "psa/error.h"

Go to the source code of this file.

Data Structures

struct  psa_storage_info_t
 A container for metadata associated with a specific uid. More...
 

Macros

#define PSA_STORAGE_FLAG_NONE   0
 No flags to pass. More...
 
#define PSA_STORAGE_FLAG_WRITE_ONCE   (1 << 0)
 The data associated with the uid will not be able to be modified or deleted. More...
 
#define PSA_STORAGE_FLAG_NO_CONFIDENTIALITY   (1 << 1)
 The data associated with the uid is public and therefore does not require confidentiality. More...
 
#define PSA_STORAGE_FLAG_NO_REPLAY_PROTECTION   (1 << 2)
 The data associated with the uid does not require replay protection. More...
 
#define PSA_STORAGE_SUPPORT_SET_EXTENDED   (1 << 0)
 Flag indicating that psa_ps_create and psa_ps_set_extended are supported. More...
 
#define PSA_ERROR_DATA_CORRUPT   ((psa_status_t)-152)
 PSA storage specific error codes. More...
 

Typedefs

typedef uint32_t psa_storage_create_flags_t
 Flags used when creating a data entry. More...
 
typedef uint64_t psa_storage_uid_t
 A type for UIDs used for identifying data. More...
 

Detailed Description

This file includes common definitions for PSA storage.

Definition in file storage_common.h.

Macro Definition Documentation

◆ PSA_STORAGE_FLAG_NONE

#define PSA_STORAGE_FLAG_NONE   0

No flags to pass.

Definition at line 36 of file storage_common.h.

◆ PSA_STORAGE_FLAG_WRITE_ONCE

#define PSA_STORAGE_FLAG_WRITE_ONCE   (1 << 0)

The data associated with the uid will not be able to be modified or deleted.

Intended to be used to set bits in psa_storage_create_flags_t

Definition at line 37 of file storage_common.h.

◆ PSA_STORAGE_FLAG_NO_CONFIDENTIALITY

#define PSA_STORAGE_FLAG_NO_CONFIDENTIALITY   (1 << 1)

The data associated with the uid is public and therefore does not require confidentiality.

It therefore only needs to be integrity protected

Definition at line 38 of file storage_common.h.

◆ PSA_STORAGE_FLAG_NO_REPLAY_PROTECTION

#define PSA_STORAGE_FLAG_NO_REPLAY_PROTECTION   (1 << 2)

The data associated with the uid does not require replay protection.

This may permit faster storage - but it permits an attecker with physical access to revert to an earlier version of the data.

Definition at line 39 of file storage_common.h.

◆ PSA_STORAGE_SUPPORT_SET_EXTENDED

#define PSA_STORAGE_SUPPORT_SET_EXTENDED   (1 << 0)

Flag indicating that psa_ps_create and psa_ps_set_extended are supported.

Definition at line 55 of file storage_common.h.

◆ PSA_ERROR_DATA_CORRUPT

#define PSA_ERROR_DATA_CORRUPT   ((psa_status_t)-152)

PSA storage specific error codes.

Definition at line 58 of file storage_common.h.

Typedef Documentation

◆ psa_storage_create_flags_t

typedef uint32_t psa_storage_create_flags_t

Flags used when creating a data entry.

Definition at line 34 of file storage_common.h.

◆ psa_storage_uid_t

typedef uint64_t psa_storage_uid_t

A type for UIDs used for identifying data.

Definition at line 43 of file storage_common.h.