Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: TYBLE16_simple_data_logger TYBLE16_MP3_Air
Hardware-Accelerated Message Digests
Generation and authentication of Message Digests (aka hashes) must be done in parts using the following sequence:
- `psa_drv_hash_setup_t`
- `psa_drv_hash_update_t`
- `psa_drv_hash_update_t`
- ...
Typedefs | |
typedef struct psa_drv_hash_context_s | psa_drv_hash_context_t |
The hardware-specific hash context structure. | |
typedef psa_status_t(* | psa_drv_hash_setup_t )(psa_drv_hash_context_t *p_context) |
The function prototype for the start operation of a hash (message digest) operation. | |
typedef psa_status_t(* | psa_drv_hash_update_t )(psa_drv_hash_context_t *p_context, const uint8_t *p_input, size_t input_length) |
The function prototype for the update operation of a hash (message digest) operation. | |
typedef psa_status_t(* | psa_drv_hash_finish_t )(psa_drv_hash_context_t *p_context, uint8_t *p_output, size_t output_size, size_t *p_output_length) |
The function prototype for the finish operation of a hash (message digest) operation. | |
typedef void(* | psa_drv_hash_abort_t )(psa_drv_hash_context_t *p_context) |
The function prototype for the abort operation of a hash (message digest) operation. |
Detailed Description
Generation and authentication of Message Digests (aka hashes) must be done in parts using the following sequence:
- `psa_drv_hash_setup_t`
- `psa_drv_hash_update_t`
- `psa_drv_hash_update_t`
- ...
- `psa_drv_hash_finish_t`
If a previously started Message Digest operation needs to be terminated before the `psa_drv_hash_finish_t` operation is complete, it should be aborted by the `psa_drv_hash_abort_t`. Failure to do so may result in allocated resources not being freed or in other undefined behavior.
Typedef Documentation
typedef void(* psa_drv_hash_abort_t)(psa_drv_hash_context_t *p_context) |
The function prototype for the abort operation of a hash (message digest) operation.
Functions that implement this prototype should be named in the following convention: ~~~~~~~~~~~~~{.c} psa_drv_hash_<ALGO>_abort ~~~~~~~~~~~~~ Where `ALGO` is the name of the underlying algorithm
- Parameters:
-
[in,out] p_context A hardware-specific structure for the previously started hash operation to be aborted
Definition at line 144 of file crypto_accel_driver.h.
typedef struct psa_drv_hash_context_s psa_drv_hash_context_t |
The hardware-specific hash context structure.
The contents of this structure are implementation dependent and are therefore not described here
Definition at line 63 of file crypto_accel_driver.h.
typedef psa_status_t(* psa_drv_hash_finish_t)(psa_drv_hash_context_t *p_context, uint8_t *p_output, size_t output_size, size_t *p_output_length) |
The function prototype for the finish operation of a hash (message digest) operation.
Functions that implement this prototype should be named in the following convention: ~~~~~~~~~~~~~{.c} psa_drv_hash_<ALGO>_finish ~~~~~~~~~~~~~ Where `ALGO` is the name of the underlying algorithm
- Parameters:
-
[in,out] p_context A hardware-specific structure for the previously started hash operation to be fiinished [out] p_output A buffer where the generated digest will be placed [in] output_size The size in bytes of the buffer that has been allocated for the `p_output` buffer [out] p_output_length The number of bytes placed in `p_output` after success
- Return values:
-
PSA_SUCCESS Success.
Definition at line 126 of file crypto_accel_driver.h.
typedef psa_status_t(* psa_drv_hash_setup_t)(psa_drv_hash_context_t *p_context) |
The function prototype for the start operation of a hash (message digest) operation.
Functions that implement this prototype should be named in the following convention: ~~~~~~~~~~~~~{.c} psa_drv_hash_<ALGO>_setup ~~~~~~~~~~~~~ Where `ALGO` is the name of the underlying hash function
- Parameters:
-
[in,out] p_context A structure that will contain the hardware-specific hash context
- Return values:
-
PSA_SUCCESS Success.
Definition at line 80 of file crypto_accel_driver.h.
typedef psa_status_t(* psa_drv_hash_update_t)(psa_drv_hash_context_t *p_context, const uint8_t *p_input, size_t input_length) |
The function prototype for the update operation of a hash (message digest) operation.
Functions that implement this prototype should be named in the following convention: ~~~~~~~~~~~~~{.c} psa_drv_hash_<ALGO>_update ~~~~~~~~~~~~~ Where `ALGO` is the name of the underlying algorithm
- Parameters:
-
[in,out] p_context A hardware-specific structure for the previously-established hash operation to be continued [in] p_input A buffer containing the message to be appended to the hash operation [in] input_length The size in bytes of the input message buffer
Definition at line 99 of file crypto_accel_driver.h.
Generated on Tue Jul 12 2022 13:55:24 by
