Changed opaque/transparent in functions/structs to se/accel
This commit is contained in:
parent
2d7e5fe31d
commit
83d2662dfa
2 changed files with 267 additions and 267 deletions
|
@ -168,7 +168,7 @@ typedef void (*psa_drv_hash_abort_t)(psa_drv_hash_context_t *p_context);
|
|||
* The contents of this structure are implementation dependent and are
|
||||
* therefore not described here.
|
||||
*/
|
||||
typedef struct psa_drv_mac_transparent_context_s psa_drv_mac_transparent_context_t;
|
||||
typedef struct psa_drv_accel_mac_context_s psa_drv_accel_mac_context_t;
|
||||
|
||||
/** \brief The function prototype for the setup operation of a
|
||||
* transparent-key MAC operation
|
||||
|
@ -190,7 +190,7 @@ typedef struct psa_drv_mac_transparent_context_s psa_drv_mac_transparent_context
|
|||
* \retval PSA_SUCCESS
|
||||
* Success.
|
||||
*/
|
||||
typedef psa_status_t (*psa_drv_mac_transparent_setup_t)(psa_drv_mac_transparent_context_t *p_context,
|
||||
typedef psa_status_t (*psa_drv_accel_mac_setup_t)(psa_drv_accel_mac_context_t *p_context,
|
||||
const uint8_t *p_key,
|
||||
size_t key_length);
|
||||
|
||||
|
@ -212,7 +212,7 @@ typedef psa_status_t (*psa_drv_mac_transparent_setup_t)(psa_drv_mac_transparent_
|
|||
* to the MAC operation
|
||||
* \param[in] input_length The size in bytes of the input message buffer
|
||||
*/
|
||||
typedef psa_status_t (*psa_drv_mac_transparent_update_t)(psa_drv_mac_transparent_context_t *p_context,
|
||||
typedef psa_status_t (*psa_drv_accel_mac_update_t)(psa_drv_accel_mac_context_t *p_context,
|
||||
const uint8_t *p_input,
|
||||
size_t input_length);
|
||||
|
||||
|
@ -237,7 +237,7 @@ typedef psa_status_t (*psa_drv_mac_transparent_update_t)(psa_drv_mac_transparent
|
|||
* \retval PSA_SUCCESS
|
||||
* Success.
|
||||
*/
|
||||
typedef psa_status_t (*psa_drv_mac_transparent_finish_t)(psa_drv_mac_transparent_context_t *p_context,
|
||||
typedef psa_status_t (*psa_drv_accel_mac_finish_t)(psa_drv_accel_mac_context_t *p_context,
|
||||
uint8_t *p_mac,
|
||||
size_t mac_length);
|
||||
|
||||
|
@ -263,7 +263,7 @@ typedef psa_status_t (*psa_drv_mac_transparent_finish_t)(psa_drv_mac_transparent
|
|||
* \retval PSA_SUCCESS
|
||||
* The operation completed successfully and the comparison matched
|
||||
*/
|
||||
typedef psa_status_t (*psa_drv_mac_transparent_finish_verify_t)(psa_drv_mac_transparent_context_t *p_context,
|
||||
typedef psa_status_t (*psa_drv_accel_mac_finish_verify_t)(psa_drv_accel_mac_context_t *p_context,
|
||||
const uint8_t *p_mac,
|
||||
size_t mac_length);
|
||||
|
||||
|
@ -283,7 +283,7 @@ typedef psa_status_t (*psa_drv_mac_transparent_finish_verify_t)(psa_drv_mac_tran
|
|||
* aborted
|
||||
*
|
||||
*/
|
||||
typedef psa_status_t (*psa_drv_mac_transparent_abort_t)(psa_drv_mac_transparent_context_t *p_context);
|
||||
typedef psa_status_t (*psa_drv_accel_mac_abort_t)(psa_drv_accel_mac_context_t *p_context);
|
||||
|
||||
/** \brief The function prototype for a one-shot operation of a transparent-key
|
||||
* MAC operation
|
||||
|
@ -306,7 +306,7 @@ typedef psa_status_t (*psa_drv_mac_transparent_abort_t)(psa_drv_mac_transparent_
|
|||
* upon success
|
||||
* \param[in] mac_length The length in bytes of the `p_mac` buffer
|
||||
*/
|
||||
typedef psa_status_t (*psa_drv_mac_transparent_t)(const uint8_t *p_input,
|
||||
typedef psa_status_t (*psa_drv_accel_mac_t)(const uint8_t *p_input,
|
||||
size_t input_length,
|
||||
const uint8_t *p_key,
|
||||
size_t key_length,
|
||||
|
@ -337,7 +337,7 @@ typedef psa_status_t (*psa_drv_mac_transparent_t)(const uint8_t *p_input,
|
|||
* \retval PSA_SUCCESS
|
||||
* The operation completed successfully and the comparison matched
|
||||
*/
|
||||
typedef psa_status_t (*psa_drv_mac_transparent_verify_t)(const uint8_t *p_input,
|
||||
typedef psa_status_t (*psa_drv_accel_mac_verify_t)(const uint8_t *p_input,
|
||||
size_t input_length,
|
||||
const uint8_t *p_key,
|
||||
size_t key_length,
|
||||
|
@ -367,7 +367,7 @@ typedef psa_status_t (*psa_drv_mac_transparent_verify_t)(const uint8_t *p_input,
|
|||
* The contents of this structure are implementation dependent and are
|
||||
* therefore not described here.
|
||||
*/
|
||||
typedef struct psa_drv_cipher_transparent_context_s psa_drv_cipher_transparent_context_t;
|
||||
typedef struct psa_drv_accel_cipher_context_s psa_drv_accel_cipher_context_t;
|
||||
|
||||
/** \brief The function prototype for the setup operation of transparent-key
|
||||
* block cipher operations.
|
||||
|
@ -395,7 +395,7 @@ typedef struct psa_drv_cipher_transparent_context_s psa_drv_cipher_transparent_c
|
|||
*
|
||||
* \retval PSA_SUCCESS
|
||||
*/
|
||||
typedef psa_status_t (*psa_drv_cipher_transparent_setup_t)(psa_drv_cipher_transparent_context_t *p_context,
|
||||
typedef psa_status_t (*psa_drv_accel_cipher_setup_t)(psa_drv_accel_cipher_context_t *p_context,
|
||||
psa_encrypt_or_decrypt_t direction,
|
||||
const uint8_t *p_key_data,
|
||||
size_t key_data_size);
|
||||
|
@ -418,7 +418,7 @@ typedef psa_status_t (*psa_drv_cipher_transparent_setup_t)(psa_drv_cipher_transp
|
|||
*
|
||||
* \retval PSA_SUCCESS
|
||||
*/
|
||||
typedef psa_status_t (*psa_drv_cipher_transparent_set_iv_t)(psa_drv_cipher_transparent_context_t *p_context,
|
||||
typedef psa_status_t (*psa_drv_accel_cipher_set_iv_t)(psa_drv_accel_cipher_context_t *p_context,
|
||||
const uint8_t *p_iv,
|
||||
size_t iv_length);
|
||||
|
||||
|
@ -447,7 +447,7 @@ typedef psa_status_t (*psa_drv_cipher_transparent_set_iv_t)(psa_drv_cipher_trans
|
|||
*
|
||||
* \retval PSA_SUCCESS
|
||||
*/
|
||||
typedef psa_status_t (*psa_drv_cipher_transparent_update_t)(psa_drv_cipher_transparent_context_t *p_context,
|
||||
typedef psa_status_t (*psa_drv_accel_cipher_update_t)(psa_drv_accel_cipher_context_t *p_context,
|
||||
const uint8_t *p_input,
|
||||
size_t input_size,
|
||||
uint8_t *p_output,
|
||||
|
@ -476,7 +476,7 @@ typedef psa_status_t (*psa_drv_cipher_transparent_update_t)(psa_drv_cipher_trans
|
|||
*
|
||||
* \retval PSA_SUCCESS
|
||||
*/
|
||||
typedef psa_status_t (*psa_drv_cipher_transparent_finish_t)(psa_drv_cipher_transparent_context_t *p_context,
|
||||
typedef psa_status_t (*psa_drv_accel_cipher_finish_t)(psa_drv_accel_cipher_context_t *p_context,
|
||||
uint8_t *p_output,
|
||||
size_t output_size,
|
||||
size_t *p_output_length);
|
||||
|
@ -498,7 +498,7 @@ typedef psa_status_t (*psa_drv_cipher_transparent_finish_t)(psa_drv_cipher_trans
|
|||
*
|
||||
* \retval PSA_SUCCESS
|
||||
*/
|
||||
typedef psa_status_t (*psa_drv_cipher_transparent_abort_t)(psa_drv_cipher_transparent_context_t *p_context);
|
||||
typedef psa_status_t (*psa_drv_accel_cipher_abort_t)(psa_drv_accel_cipher_context_t *p_context);
|
||||
|
||||
/**@}*/
|
||||
|
||||
|
@ -553,7 +553,7 @@ typedef psa_status_t (*psa_drv_cipher_transparent_abort_t)(psa_drv_cipher_transp
|
|||
* \retval #PSA_SUCCESS
|
||||
|
||||
*/
|
||||
typedef psa_status_t (*psa_drv_aead_transparent_encrypt_t)(const uint8_t *p_key,
|
||||
typedef psa_status_t (*psa_drv_accel_aead_encrypt_t)(const uint8_t *p_key,
|
||||
size_t key_length,
|
||||
psa_algorithm_t alg,
|
||||
const uint8_t *nonce,
|
||||
|
@ -604,7 +604,7 @@ typedef psa_status_t (*psa_drv_aead_transparent_encrypt_t)(const uint8_t *p_key,
|
|||
* \retval #PSA_SUCCESS
|
||||
* Success.
|
||||
*/
|
||||
typedef psa_status_t (*psa_drv_aead_transparent_decrypt_t)(const uint8_t *p_key,
|
||||
typedef psa_status_t (*psa_drv_accel_aead_decrypt_t)(const uint8_t *p_key,
|
||||
size_t key_length,
|
||||
psa_algorithm_t alg,
|
||||
const uint8_t *nonce,
|
||||
|
@ -653,7 +653,7 @@ typedef psa_status_t (*psa_drv_aead_transparent_decrypt_t)(const uint8_t *p_key,
|
|||
*
|
||||
* \retval PSA_SUCCESS
|
||||
*/
|
||||
typedef psa_status_t (*psa_drv_asymmetric_transparent_sign_t)(const uint8_t *p_key,
|
||||
typedef psa_status_t (*psa_drv_accel_asymmetric_sign_t)(const uint8_t *p_key,
|
||||
size_t key_size,
|
||||
psa_algorithm_t alg,
|
||||
const uint8_t *p_hash,
|
||||
|
@ -686,7 +686,7 @@ typedef psa_status_t (*psa_drv_asymmetric_transparent_sign_t)(const uint8_t *p_k
|
|||
* \retval PSA_SUCCESS
|
||||
* The signature is valid.
|
||||
*/
|
||||
typedef psa_status_t (*psa_drv_asymmetric_transparent_verify_t)(const uint8_t *p_key,
|
||||
typedef psa_status_t (*psa_drv_accel_asymmetric_verify_t)(const uint8_t *p_key,
|
||||
size_t key_size,
|
||||
psa_algorithm_t alg,
|
||||
const uint8_t *p_hash,
|
||||
|
@ -730,7 +730,7 @@ typedef psa_status_t (*psa_drv_asymmetric_transparent_verify_t)(const uint8_t *p
|
|||
*
|
||||
* \retval PSA_SUCCESS
|
||||
*/
|
||||
typedef psa_status_t (*psa_drv_asymmetric_transparent_encrypt_t)(const uint8_t *p_key,
|
||||
typedef psa_status_t (*psa_drv_accel_asymmetric_encrypt_t)(const uint8_t *p_key,
|
||||
size_t key_size,
|
||||
psa_algorithm_t alg,
|
||||
const uint8_t *p_input,
|
||||
|
@ -776,7 +776,7 @@ typedef psa_status_t (*psa_drv_asymmetric_transparent_encrypt_t)(const uint8_t *
|
|||
*
|
||||
* \retval PSA_SUCCESS
|
||||
*/
|
||||
typedef psa_status_t (*psa_drv_asymmetric_transparent_decrypt_t)(const uint8_t *p_key,
|
||||
typedef psa_status_t (*psa_drv_accel_asymmetric_decrypt_t)(const uint8_t *p_key,
|
||||
size_t key_size,
|
||||
psa_algorithm_t alg,
|
||||
const uint8_t *p_input,
|
||||
|
|
|
@ -75,7 +75,7 @@ typedef uint32_t psa_key_slot_t;
|
|||
* \retval PSA_SUCCESS
|
||||
* Success.
|
||||
*/
|
||||
typedef psa_status_t (*psa_drv_mac_opaque_setup_t)(void *p_context,
|
||||
typedef psa_status_t (*psa_drv_se_mac_setup_t)(void *p_context,
|
||||
psa_key_slot_t key_slot,
|
||||
psa_algorithm_t algorithm);
|
||||
|
||||
|
@ -89,7 +89,7 @@ typedef psa_status_t (*psa_drv_mac_opaque_setup_t)(void *p_context,
|
|||
* to the MAC operation
|
||||
* \param[in] input_length The size in bytes of the input message buffer
|
||||
*/
|
||||
typedef psa_status_t (*psa_drv_mac_opaque_update_t)(void *p_context,
|
||||
typedef psa_status_t (*psa_drv_se_mac_update_t)(void *p_context,
|
||||
const uint8_t *p_input,
|
||||
size_t input_length);
|
||||
|
||||
|
@ -109,7 +109,7 @@ typedef psa_status_t (*psa_drv_mac_opaque_update_t)(void *p_context,
|
|||
* \retval PSA_SUCCESS
|
||||
* Success.
|
||||
*/
|
||||
typedef psa_status_t (*psa_drv_mac_opaque_finish_t)(void *p_context,
|
||||
typedef psa_status_t (*psa_drv_se_mac_finish_t)(void *p_context,
|
||||
uint8_t *p_mac,
|
||||
size_t mac_size,
|
||||
size_t *p_mac_length);
|
||||
|
@ -130,7 +130,7 @@ typedef psa_status_t (*psa_drv_mac_opaque_finish_t)(void *p_context,
|
|||
* The operation completed successfully, but the calculated MAC did
|
||||
* not match the provided MAC
|
||||
*/
|
||||
typedef psa_status_t (*psa_drv_mac_opaque_finish_verify_t)(void *p_context,
|
||||
typedef psa_status_t (*psa_drv_se_mac_finish_verify_t)(void *p_context,
|
||||
const uint8_t *p_mac,
|
||||
size_t mac_length);
|
||||
|
||||
|
@ -139,7 +139,7 @@ typedef psa_status_t (*psa_drv_mac_opaque_finish_verify_t)(void *p_context,
|
|||
* \param[in,out] p_context A hardware-specific structure for the previously
|
||||
* started MAC operation to be aborted
|
||||
*/
|
||||
typedef psa_status_t (*psa_drv_mac_opaque_abort_t)(void *p_context);
|
||||
typedef psa_status_t (*psa_drv_se_mac_abort_t)(void *p_context);
|
||||
|
||||
/** \brief A function that performs a MAC operation in one command and returns
|
||||
* the calculated MAC using an opaque key
|
||||
|
@ -158,7 +158,7 @@ typedef psa_status_t (*psa_drv_mac_opaque_abort_t)(void *p_context);
|
|||
* \retval PSA_SUCCESS
|
||||
* Success.
|
||||
*/
|
||||
typedef psa_status_t (*psa_drv_mac_opaque_generate_t)(const uint8_t *p_input,
|
||||
typedef psa_status_t (*psa_drv_se_mac_generate_t)(const uint8_t *p_input,
|
||||
size_t input_length,
|
||||
psa_key_slot_t key_slot,
|
||||
psa_algorithm_t alg,
|
||||
|
@ -185,7 +185,7 @@ typedef psa_status_t (*psa_drv_mac_opaque_generate_t)(const uint8_t *p_input,
|
|||
* The operation completed successfully, but the calculated MAC did
|
||||
* not match the provided MAC
|
||||
*/
|
||||
typedef psa_status_t (*psa_drv_mac_opaque_verify_t)(const uint8_t *p_input,
|
||||
typedef psa_status_t (*psa_drv_se_mac_verify_t)(const uint8_t *p_input,
|
||||
size_t input_length,
|
||||
psa_key_slot_t key_slot,
|
||||
psa_algorithm_t alg,
|
||||
|
@ -213,26 +213,26 @@ typedef struct {
|
|||
size_t context_size;
|
||||
/** Function that performs the setup operation
|
||||
*/
|
||||
psa_drv_mac_opaque_setup_t *p_setup;
|
||||
psa_drv_se_mac_setup_t *p_setup;
|
||||
/** Function that performs the update operation
|
||||
*/
|
||||
psa_drv_mac_opaque_update_t *p_update;
|
||||
psa_drv_se_mac_update_t *p_update;
|
||||
/** Function that completes the operation
|
||||
*/
|
||||
psa_drv_mac_opaque_finish_t *p_finish;
|
||||
psa_drv_se_mac_finish_t *p_finish;
|
||||
/** Function that completed a MAC operation with a verify check
|
||||
*/
|
||||
psa_drv_mac_opaque_finish_verify_t *p_finish_verify;
|
||||
psa_drv_se_mac_finish_verify_t *p_finish_verify;
|
||||
/** Function that aborts a previoustly started operation
|
||||
*/
|
||||
psa_drv_mac_opaque_abort_t *p_abort;
|
||||
psa_drv_se_mac_abort_t *p_abort;
|
||||
/** Function that performs the MAC operation in one call
|
||||
*/
|
||||
psa_drv_mac_opaque_generate_t *p_mac;
|
||||
psa_drv_se_mac_generate_t *p_mac;
|
||||
/** Function that performs the MAC and verify operation in one call
|
||||
*/
|
||||
psa_drv_mac_opaque_verify_t *p_mac_verify;
|
||||
} psa_drv_mac_opaque_t;
|
||||
psa_drv_se_mac_verify_t *p_mac_verify;
|
||||
} psa_drv_se_mac_t;
|
||||
/**@}*/
|
||||
|
||||
/** \defgroup opaque_cipher Opaque Symmetric Ciphers
|
||||
|
@ -272,7 +272,7 @@ typedef struct {
|
|||
* \retval PSA_SUCCESS
|
||||
* \retval PSA_ERROR_NOT_SUPPORTED
|
||||
*/
|
||||
typedef psa_status_t (*psa_drv_cipher_opaque_setup_t)(void *p_context,
|
||||
typedef psa_status_t (*psa_drv_se_cipher_setup_t)(void *p_context,
|
||||
psa_key_slot_t key_slot,
|
||||
psa_algorithm_t algorithm,
|
||||
psa_encrypt_or_decrypt_t direction);
|
||||
|
@ -292,7 +292,7 @@ typedef psa_status_t (*psa_drv_cipher_opaque_setup_t)(void *p_context,
|
|||
*
|
||||
* \retval PSA_SUCCESS
|
||||
*/
|
||||
typedef psa_status_t (*psa_drv_cipher_opaque_set_iv_t)(void *p_context,
|
||||
typedef psa_status_t (*psa_drv_se_cipher_set_iv_t)(void *p_context,
|
||||
const uint8_t *p_iv,
|
||||
size_t iv_length);
|
||||
|
||||
|
@ -314,7 +314,7 @@ typedef psa_status_t (*psa_drv_cipher_opaque_set_iv_t)(void *p_context,
|
|||
*
|
||||
* \retval PSA_SUCCESS
|
||||
*/
|
||||
typedef psa_status_t (*psa_drv_cipher_opaque_update_t)(void *p_context,
|
||||
typedef psa_status_t (*psa_drv_se_cipher_update_t)(void *p_context,
|
||||
const uint8_t *p_input,
|
||||
size_t input_size,
|
||||
uint8_t *p_output,
|
||||
|
@ -335,7 +335,7 @@ typedef psa_status_t (*psa_drv_cipher_opaque_update_t)(void *p_context,
|
|||
*
|
||||
* \retval PSA_SUCCESS
|
||||
*/
|
||||
typedef psa_status_t (*psa_drv_cipher_opaque_finish_t)(void *p_context,
|
||||
typedef psa_status_t (*psa_drv_se_cipher_finish_t)(void *p_context,
|
||||
uint8_t *p_output,
|
||||
size_t output_size,
|
||||
size_t *p_output_length);
|
||||
|
@ -346,7 +346,7 @@ typedef psa_status_t (*psa_drv_cipher_opaque_finish_t)(void *p_context,
|
|||
* \param[in,out] p_context A hardware-specific structure for the
|
||||
* previously started cipher operation
|
||||
*/
|
||||
typedef psa_status_t (*psa_drv_cipher_opaque_abort_t)(void *p_context);
|
||||
typedef psa_status_t (*psa_drv_se_cipher_abort_t)(void *p_context);
|
||||
|
||||
/** \brief A function that performs the ECB block mode for opaque-key cipher
|
||||
* operations
|
||||
|
@ -370,7 +370,7 @@ typedef psa_status_t (*psa_drv_cipher_opaque_abort_t)(void *p_context);
|
|||
* \retval PSA_SUCCESS
|
||||
* \retval PSA_ERROR_NOT_SUPPORTED
|
||||
*/
|
||||
typedef psa_status_t (*psa_drv_cipher_opaque_ecb_t)(psa_key_slot_t key_slot,
|
||||
typedef psa_status_t (*psa_drv_se_cipher_ecb_t)(psa_key_slot_t key_slot,
|
||||
psa_algorithm_t algorithm,
|
||||
psa_encrypt_or_decrypt_t direction,
|
||||
const uint8_t *p_input,
|
||||
|
@ -394,21 +394,21 @@ typedef struct {
|
|||
*/
|
||||
size_t size;
|
||||
/** Function that performs the setup operation */
|
||||
psa_drv_cipher_opaque_setup_t *p_setup;
|
||||
psa_drv_se_cipher_setup_t *p_setup;
|
||||
/** Function that sets the IV (if necessary) */
|
||||
psa_drv_cipher_opaque_set_iv_t *p_set_iv;
|
||||
psa_drv_se_cipher_set_iv_t *p_set_iv;
|
||||
/** Function that performs the update operation */
|
||||
psa_drv_cipher_opaque_update_t *p_update;
|
||||
psa_drv_se_cipher_update_t *p_update;
|
||||
/** Function that completes the operation */
|
||||
psa_drv_cipher_opaque_finish_t *p_finish;
|
||||
psa_drv_se_cipher_finish_t *p_finish;
|
||||
/** Function that aborts the operation */
|
||||
psa_drv_cipher_opaque_abort_t *p_abort;
|
||||
psa_drv_se_cipher_abort_t *p_abort;
|
||||
/** Function that performs ECB mode for the cipher
|
||||
* (Danger: ECB mode should not be used directly by clients of the PSA
|
||||
* Crypto Client API)
|
||||
*/
|
||||
psa_drv_cipher_opaque_ecb_t *p_ecb;
|
||||
} psa_drv_cipher_opaque_t;
|
||||
psa_drv_se_cipher_ecb_t *p_ecb;
|
||||
} psa_drv_se_cipher_t;
|
||||
|
||||
/**@}*/
|
||||
|
||||
|
@ -435,7 +435,7 @@ typedef struct {
|
|||
*
|
||||
* \retval PSA_SUCCESS
|
||||
*/
|
||||
typedef psa_status_t (*psa_drv_asymmetric_opaque_sign_t)(psa_key_slot_t key_slot,
|
||||
typedef psa_status_t (*psa_drv_se_asymmetric_sign_t)(psa_key_slot_t key_slot,
|
||||
psa_algorithm_t alg,
|
||||
const uint8_t *p_hash,
|
||||
size_t hash_length,
|
||||
|
@ -459,7 +459,7 @@ typedef psa_status_t (*psa_drv_asymmetric_opaque_sign_t)(psa_key_slot_t key_slot
|
|||
* \retval PSA_SUCCESS
|
||||
* The signature is valid.
|
||||
*/
|
||||
typedef psa_status_t (*psa_drv_asymmetric_opaque_verify_t)(psa_key_slot_t key_slot,
|
||||
typedef psa_status_t (*psa_drv_se_asymmetric_verify_t)(psa_key_slot_t key_slot,
|
||||
psa_algorithm_t alg,
|
||||
const uint8_t *p_hash,
|
||||
size_t hash_length,
|
||||
|
@ -495,7 +495,7 @@ typedef psa_status_t (*psa_drv_asymmetric_opaque_verify_t)(psa_key_slot_t key_sl
|
|||
*
|
||||
* \retval PSA_SUCCESS
|
||||
*/
|
||||
typedef psa_status_t (*psa_drv_asymmetric_opaque_encrypt_t)(psa_key_slot_t key_slot,
|
||||
typedef psa_status_t (*psa_drv_se_asymmetric_encrypt_t)(psa_key_slot_t key_slot,
|
||||
psa_algorithm_t alg,
|
||||
const uint8_t *p_input,
|
||||
size_t input_length,
|
||||
|
@ -532,7 +532,7 @@ typedef psa_status_t (*psa_drv_asymmetric_opaque_encrypt_t)(psa_key_slot_t key_s
|
|||
*
|
||||
* \retval PSA_SUCCESS
|
||||
*/
|
||||
typedef psa_status_t (*psa_drv_asymmetric_opaque_decrypt_t)(psa_key_slot_t key_slot,
|
||||
typedef psa_status_t (*psa_drv_se_asymmetric_decrypt_t)(psa_key_slot_t key_slot,
|
||||
psa_algorithm_t alg,
|
||||
const uint8_t *p_input,
|
||||
size_t input_length,
|
||||
|
@ -553,14 +553,14 @@ typedef psa_status_t (*psa_drv_asymmetric_opaque_decrypt_t)(psa_key_slot_t key_s
|
|||
*/
|
||||
typedef struct {
|
||||
/** Function that performs the asymmetric sign operation */
|
||||
psa_drv_asymmetric_opaque_sign_t *p_sign;
|
||||
psa_drv_se_asymmetric_sign_t *p_sign;
|
||||
/** Function that performs the asymmetric verify operation */
|
||||
psa_drv_asymmetric_opaque_verify_t *p_verify;
|
||||
psa_drv_se_asymmetric_verify_t *p_verify;
|
||||
/** Function that performs the asymmetric encrypt operation */
|
||||
psa_drv_asymmetric_opaque_encrypt_t *p_encrypt;
|
||||
psa_drv_se_asymmetric_encrypt_t *p_encrypt;
|
||||
/** Function that performs the asymmetric decrypt operation */
|
||||
psa_drv_asymmetric_opaque_decrypt_t *p_decrypt;
|
||||
} psa_drv_asymmetric_opaque_t;
|
||||
psa_drv_se_asymmetric_decrypt_t *p_decrypt;
|
||||
} psa_drv_se_asymmetric_t;
|
||||
|
||||
/**@}*/
|
||||
|
||||
|
@ -602,7 +602,7 @@ typedef struct {
|
|||
* \retval #PSA_SUCCESS
|
||||
* Success.
|
||||
*/
|
||||
typedef psa_status_t (*psa_drv_aead_opaque_encrypt_t)(psa_key_slot_t key_slot,
|
||||
typedef psa_status_t (*psa_drv_se_aead_encrypt_t)(psa_key_slot_t key_slot,
|
||||
psa_algorithm_t algorithm,
|
||||
const uint8_t *p_nonce,
|
||||
size_t nonce_length,
|
||||
|
@ -642,7 +642,7 @@ typedef psa_status_t (*psa_drv_aead_opaque_encrypt_t)(psa_key_slot_t key_slot,
|
|||
* \retval #PSA_SUCCESS
|
||||
* Success.
|
||||
*/
|
||||
typedef psa_status_t (*psa_drv_aead_opaque_decrypt_t)(psa_key_slot_t key_slot,
|
||||
typedef psa_status_t (*psa_drv_se_aead_decrypt_t)(psa_key_slot_t key_slot,
|
||||
psa_algorithm_t algorithm,
|
||||
const uint8_t *p_nonce,
|
||||
size_t nonce_length,
|
||||
|
@ -665,10 +665,10 @@ typedef psa_status_t (*psa_drv_aead_opaque_decrypt_t)(psa_key_slot_t key_slot,
|
|||
*/
|
||||
typedef struct {
|
||||
/** Function that performs the AEAD encrypt operation */
|
||||
psa_drv_aead_opaque_encrypt_t *p_encrypt;
|
||||
psa_drv_se_aead_encrypt_t *p_encrypt;
|
||||
/** Function that performs the AEAD decrypt operation */
|
||||
psa_drv_aead_opaque_decrypt_t *p_decrypt;
|
||||
} psa_drv_aead_opaque_t;
|
||||
psa_drv_se_aead_decrypt_t *p_decrypt;
|
||||
} psa_drv_se_aead_t;
|
||||
/**@}*/
|
||||
|
||||
/** \defgroup driver_key_management Key Management
|
||||
|
@ -696,7 +696,7 @@ typedef struct {
|
|||
* \retval #PSA_SUCCESS
|
||||
* Success.
|
||||
*/
|
||||
typedef psa_status_t (*psa_drv_opaque_import_key_t)(psa_key_slot_t key_slot,
|
||||
typedef psa_status_t (*psa_drv_se_import_key_t)(psa_key_slot_t key_slot,
|
||||
psa_key_type_t type,
|
||||
psa_algorithm_t algorithm,
|
||||
psa_key_usage_t usage,
|
||||
|
@ -719,7 +719,7 @@ typedef psa_status_t (*psa_drv_opaque_import_key_t)(psa_key_slot_t key_slot,
|
|||
* \retval #PSA_SUCCESS
|
||||
* The slot's content, if any, has been erased.
|
||||
*/
|
||||
typedef psa_status_t (*psa_drv_destroy_key_t)(psa_key_slot_t key);
|
||||
typedef psa_status_t (*psa_drv_se_destroy_key_t)(psa_key_slot_t key);
|
||||
|
||||
/**
|
||||
* \brief Export a key in binary format
|
||||
|
@ -761,7 +761,7 @@ typedef psa_status_t (*psa_drv_destroy_key_t)(psa_key_slot_t key);
|
|||
* \retval #PSA_ERROR_HARDWARE_FAILURE
|
||||
* \retval #PSA_ERROR_TAMPERING_DETECTED
|
||||
*/
|
||||
typedef psa_status_t (*psa_drv_export_key_t)(psa_key_slot_t key,
|
||||
typedef psa_status_t (*psa_drv_se_export_key_t)(psa_key_slot_t key,
|
||||
uint8_t *p_data,
|
||||
size_t data_size,
|
||||
size_t *p_data_length);
|
||||
|
@ -787,7 +787,7 @@ typedef psa_status_t (*psa_drv_export_key_t)(psa_key_slot_t key,
|
|||
*
|
||||
* \retval #PSA_SUCCESS
|
||||
*/
|
||||
typedef psa_status_t (*psa_drv_export_public_key_t)(psa_key_slot_t key,
|
||||
typedef psa_status_t (*psa_drv_se_export_public_key_t)(psa_key_slot_t key,
|
||||
uint8_t *p_data,
|
||||
size_t data_size,
|
||||
size_t *p_data_length);
|
||||
|
@ -803,14 +803,14 @@ typedef psa_status_t (*psa_drv_export_public_key_t)(psa_key_slot_t key,
|
|||
*/
|
||||
typedef struct {
|
||||
/** Function that performs the key import operation */
|
||||
psa_drv_opaque_import_key_t *p_import;
|
||||
psa_drv_se_import_key_t *p_import;
|
||||
/** Function that performs the key destroy operation */
|
||||
psa_drv_destroy_key_t *p_destroy;
|
||||
psa_drv_se_destroy_key_t *p_destroy;
|
||||
/** Function that performs the key export operation */
|
||||
psa_drv_export_key_t *p_export;
|
||||
psa_drv_se_export_key_t *p_export;
|
||||
/** Function that perforsm the public key export operation */
|
||||
psa_drv_export_public_key_t *p_export_public;
|
||||
} psa_drv_key_management_t;
|
||||
psa_drv_se_export_public_key_t *p_export_public;
|
||||
} psa_drv_se_key_management_t;
|
||||
|
||||
/**@}*/
|
||||
|
||||
|
@ -881,7 +881,7 @@ typedef struct psa_drv_key_derivation_context_s psa_drv_key_derivation_context_t
|
|||
*
|
||||
* \retval PSA_SUCCESS
|
||||
*/
|
||||
typedef psa_status_t (*psa_drv_key_derivation_setup_t)(psa_drv_key_derivation_context_t *p_context,
|
||||
typedef psa_status_t (*psa_drv_se_key_derivation_setup_t)(psa_drv_key_derivation_context_t *p_context,
|
||||
psa_algorithm_t kdf_alg,
|
||||
psa_key_slot_t source_key);
|
||||
|
||||
|
@ -900,7 +900,7 @@ typedef psa_status_t (*psa_drv_key_derivation_setup_t)(psa_drv_key_derivation_co
|
|||
*
|
||||
* \retval PSA_SUCCESS
|
||||
*/
|
||||
typedef psa_status_t (*psa_drv_key_derivation_collateral_t)(psa_drv_key_derivation_context_t *p_context,
|
||||
typedef psa_status_t (*psa_drv_se_key_derivation_collateral_t)(psa_drv_key_derivation_context_t *p_context,
|
||||
uint32_t collateral_id,
|
||||
const uint8_t *p_collateral,
|
||||
size_t collateral_size);
|
||||
|
@ -914,7 +914,7 @@ typedef psa_status_t (*psa_drv_key_derivation_collateral_t)(psa_drv_key_derivati
|
|||
*
|
||||
* \retval PSA_SUCCESS
|
||||
*/
|
||||
typedef psa_status_t (*psa_drv_key_derivation_derive_t)(psa_drv_key_derivation_context_t *p_context,
|
||||
typedef psa_status_t (*psa_drv_se_key_derivation_derive_t)(psa_drv_key_derivation_context_t *p_context,
|
||||
psa_key_slot_t dest_key);
|
||||
|
||||
/** \brief Perform the final step of a key agreement and place the generated
|
||||
|
@ -928,7 +928,7 @@ typedef psa_status_t (*psa_drv_key_derivation_derive_t)(psa_drv_key_derivation_c
|
|||
*
|
||||
* \retval PSA_SUCCESS
|
||||
*/
|
||||
typedef psa_status_t (*psa_drv_key_derivation_export_t)(uint8_t *p_output,
|
||||
typedef psa_status_t (*psa_drv_se_key_derivation_export_t)(uint8_t *p_output,
|
||||
size_t output_size,
|
||||
size_t *p_output_length);
|
||||
|
||||
|
@ -943,15 +943,15 @@ typedef psa_status_t (*psa_drv_key_derivation_export_t)(uint8_t *p_output,
|
|||
*/
|
||||
typedef struct {
|
||||
/** Function that performs the key derivation setup */
|
||||
psa_drv_key_derivation_setup_t *p_setup;
|
||||
psa_drv_se_key_derivation_setup_t *p_setup;
|
||||
/** Function that sets the key derivation collateral */
|
||||
psa_drv_key_derivation_collateral_t *p_collateral;
|
||||
psa_drv_se_key_derivation_collateral_t *p_collateral;
|
||||
/** Function that performs the final key derivation step */
|
||||
psa_drv_key_derivation_derive_t *p_derive;
|
||||
psa_drv_se_key_derivation_derive_t *p_derive;
|
||||
/** Function that perforsm the final key derivation or agreement and
|
||||
* exports the key */
|
||||
psa_drv_key_derivation_export_t *p_export;
|
||||
} psa_drv_key_derivation_t;
|
||||
psa_drv_se_key_derivation_export_t *p_export;
|
||||
} psa_drv_se_key_derivation_t;
|
||||
|
||||
/**@}*/
|
||||
|
||||
|
|
Loading…
Reference in a new issue