Mistake on this page?
Report an issue in GitHub or email us
Data Structures | Macros | Functions
Secure element driver registration

Data Structures

struct  psa_drv_se_t
 A structure containing pointers to all the entry points of a secure element driver. More...
 

Macros

#define PSA_DRV_SE_HAL_VERSION   0x00000005
 The current version of the secure element driver HAL. More...
 

Functions

psa_status_t psa_register_se_driver (psa_key_lifetime_t lifetime, const psa_drv_se_t *methods)
 Register an external cryptoprocessor (secure element) driver. More...
 

Detailed Description

Macro Definition Documentation

#define PSA_DRV_SE_HAL_VERSION   0x00000005

The current version of the secure element driver HAL.

Definition at line 1328 of file crypto_se_driver.h.

Function Documentation

psa_status_t psa_register_se_driver ( psa_key_lifetime_t  lifetime,
const psa_drv_se_t methods 
)

Register an external cryptoprocessor (secure element) driver.

This function is only intended to be used by driver code, not by application code. In implementations with separation between the PSA cryptography module and applications, this function should only be available to callers that run in the same memory space as the cryptography module, and should not be exposed to applications running in a different memory space.

This function may be called before psa_crypto_init(). It is implementation-defined whether this function may be called after psa_crypto_init().

Note
Implementations store metadata about keys including the lifetime value. Therefore, from one instantiation of the PSA Cryptography library to the next one, if there is a key in storage with a certain lifetime value, you must always register the same driver (or an updated version that communicates with the same secure element) with the same lifetime value.
Parameters
lifetimeThe lifetime value through which this driver will be exposed to applications. The values PSA_KEY_LIFETIME_VOLATILE and PSA_KEY_LIFETIME_PERSISTENT are reserved and may not be used for drivers. Implementations may reserve other values.
[in]methodsThe method table of the driver. This structure must remain valid for as long as the cryptography module keeps running. It is typically a global constant.
Returns
PSA_SUCCESS The driver was successfully registered. Applications can now use lifetime to access keys through the methods passed to this function.
PSA_ERROR_BAD_STATE This function was called after the initialization of the cryptography module, and this implementation does not support driver registration at this stage.
PSA_ERROR_ALREADY_EXISTS There is already a registered driver for this value of lifetime.
PSA_ERROR_INVALID_ARGUMENT lifetime is a reserved value.
PSA_ERROR_NOT_SUPPORTED methods->hal_version is not supported by this implementation.
PSA_ERROR_INSUFFICIENT_MEMORY
PSA_ERROR_NOT_PERMITTED
Important Information for this Arm website

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies. If you are not happy with the use of these cookies, please review our Cookie Policy to learn how they can be disabled. By disabling cookies, some features of the site will not work.