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 Authenticated Encryption with Additional Data
Hardware-accelerated Authenticated Encryption with Additional Data (AEAD) operations must be done in one function call. More...
Typedefs | |
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, size_t nonce_length, const uint8_t *additional_data, size_t additional_data_length, const uint8_t *plaintext, size_t plaintext_length, uint8_t *ciphertext, size_t ciphertext_size, size_t *ciphertext_length) |
The function prototype for the hardware-accelerated authenticated encryption operation. | |
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, size_t nonce_length, const uint8_t *additional_data, size_t additional_data_length, const uint8_t *ciphertext, size_t ciphertext_length, uint8_t *plaintext, size_t plaintext_size, size_t *plaintext_length) |
The function prototype for the hardware-accelerated authenticated decryption operation. |
Detailed Description
Hardware-accelerated Authenticated Encryption with Additional Data (AEAD) operations must be done in one function call.
While this creates a burden for implementers as there must be sufficient space in memory for the entire message, it prevents decrypted data from being made available before the authentication operation is complete and the data is known to be authentic.
Typedef Documentation
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, size_t nonce_length, const uint8_t *additional_data, size_t additional_data_length, const uint8_t *ciphertext, size_t ciphertext_length, uint8_t *plaintext, size_t plaintext_size, size_t *plaintext_length) |
The function prototype for the hardware-accelerated authenticated decryption operation.
Functions that implement this prototype should be named in the following convention: ~~~~~~~~~~~~~{.c} psa_drv_accel_aead_<ALGO>_decrypt ~~~~~~~~~~~~~ Where `ALGO` is the name of the AEAD algorithm
- Parameters:
-
[in] p_key A pointer to the key material [in] key_length The size in bytes of the key material [in] alg The AEAD algorithm to compute ( PSA_ALG_XXX
value such that PSA_ALG_IS_AEAD(`alg`) is true)[in] nonce Nonce or IV to use [in] nonce_length Size of the `nonce` buffer in bytes [in] additional_data Additional data that has been MACed but not encrypted [in] additional_data_length Size of `additional_data` in bytes [in] ciphertext Data that has been MACed and encrypted For algorithms where the encrypted data and the authentication tag are defined as separate inputs, the buffer must contain the encrypted data followed by the authentication tag. [in] ciphertext_length Size of `ciphertext` in bytes [out] plaintext Output buffer for the decrypted data [in] plaintext_size Size of the `plaintext` buffer in bytes This must be at least PSA_AEAD_DECRYPT_OUTPUT_SIZE(`alg`, `ciphertext_length`). [out] plaintext_length On success, the size of the output in the plaintext buffer
- Return values:
-
PSA_SUCCESS Success.
Definition at line 611 of file crypto_accel_driver.h.
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, size_t nonce_length, const uint8_t *additional_data, size_t additional_data_length, const uint8_t *plaintext, size_t plaintext_length, uint8_t *ciphertext, size_t ciphertext_size, size_t *ciphertext_length) |
The function prototype for the hardware-accelerated authenticated encryption operation.
Functions that implement this prototype should be named in the following convention: ~~~~~~~~~~~~~{.c} psa_drv_accel_aead_<ALGO>_encrypt ~~~~~~~~~~~~~ Where `ALGO` is the name of the AEAD algorithm
- Parameters:
-
[in] p_key A pointer to the key material [in] key_length The size in bytes of the key material [in] alg The AEAD algorithm to compute ( PSA_ALG_XXX
value such that PSA_ALG_IS_AEAD(`alg`) is true)[in] nonce Nonce or IV to use [in] nonce_length Size of the `nonce` buffer in bytes [in] additional_data Additional data that will be MACed but not encrypted. [in] additional_data_length Size of `additional_data` in bytes [in] plaintext Data that will be MACed and encrypted. [in] plaintext_length Size of `plaintext` in bytes [out] ciphertext Output buffer for the authenticated and encrypted data. The additional data is not part of this output. For algorithms where the encrypted data and the authentication tag are defined as separate outputs, the authentication tag is appended to the encrypted data. [in] ciphertext_size Size of the `ciphertext` buffer in bytes This must be at least PSA_AEAD_ENCRYPT_OUTPUT_SIZE(`alg`, `plaintext_length`). [out] ciphertext_length On success, the size of the output in the `ciphertext` buffer
- Return values:
-
PSA_SUCCESS
Definition at line 559 of file crypto_accel_driver.h.
Generated on Tue Jul 12 2022 13:55:24 by
