Zephyr API
4.4.99
A Scalable Open Source RTOS
Toggle main menu visibility
Loading...
Searching...
No Matches
aead.h
Go to the documentation of this file.
1
/* Copyright (c) 2024 Nordic Semiconductor
2
* SPDX-License-Identifier: Apache-2.0
3
*/
4
#ifndef SECURE_STORAGE_ITS_TRANSFORM_AEAD_H
5
#define SECURE_STORAGE_ITS_TRANSFORM_AEAD_H
6
15
#include <
zephyr/secure_storage/its/common.h
>
16
#include <psa/crypto_types.h>
17
19
#define SECURE_STORAGE_ITS_TRANSFORM_AEAD_TAG_SIZE \
20
(CONFIG_SECURE_STORAGE_ITS_TRANSFORM_OUTPUT_OVERHEAD \
21
- CONFIG_SECURE_STORAGE_ITS_TRANSFORM_AEAD_NONCE_SIZE)
22
42
psa_status_t
secure_storage_its_transform_aead_crypt
(
43
psa_key_usage_t operation,
secure_storage_its_uid_t
uid,
44
const
uint8_t
nonce[
static
CONFIG_SECURE_STORAGE_ITS_TRANSFORM_AEAD_NONCE_SIZE],
45
size_t
add_data_len,
const
uint8_t
*add_data,
size_t
input_len,
46
const
uint8_t
*input,
size_t
output_size,
uint8_t
*output,
size_t
*output_len);
47
48
#if defined(CONFIG_SECURE_STORAGE_ITS_TRANSFORM_AEAD_SCHEME_IS_CONFIGURABLE) || defined(__DOXYGEN__)
49
55
void
secure_storage_its_transform_aead_get_scheme
(psa_key_type_t *key_type, psa_algorithm_t *alg);
56
57
#endif
/* CONFIG_SECURE_STORAGE_ITS_TRANSFORM_AEAD_SCHEME_IS_CONFIGURABLE */
58
59
#if !defined(CONFIG_SECURE_STORAGE_ITS_TRANSFORM_AEAD_CRYPT_CUSTOM) || defined(__DOXYGEN__)
60
68
psa_status_t
secure_storage_its_transform_aead_get_key
(
69
secure_storage_its_uid_t
uid,
70
uint8_t
key[
static
CONFIG_SECURE_STORAGE_ITS_TRANSFORM_AEAD_KEY_SIZE]);
71
72
#endif
/* SECURE_STORAGE_ITS_TRANSFORM_AEAD_CRYPT_CUSTOM */
73
80
psa_status_t
secure_storage_its_transform_aead_get_nonce
(
81
uint8_t
nonce[
static
CONFIG_SECURE_STORAGE_ITS_TRANSFORM_AEAD_NONCE_SIZE]);
82
83
#endif
secure_storage_its_transform_aead_get_key
psa_status_t secure_storage_its_transform_aead_get_key(secure_storage_its_uid_t uid, uint8_t key[static CONFIG_SECURE_STORAGE_ITS_TRANSFORM_AEAD_KEY_SIZE])
Returns the encryption key to use for an ITS entry's AEAD operations.
secure_storage_its_transform_aead_get_nonce
psa_status_t secure_storage_its_transform_aead_get_nonce(uint8_t nonce[static CONFIG_SECURE_STORAGE_ITS_TRANSFORM_AEAD_NONCE_SIZE])
Generates a nonce for an AEAD operation.
secure_storage_its_transform_aead_crypt
psa_status_t secure_storage_its_transform_aead_crypt(psa_key_usage_t operation, secure_storage_its_uid_t uid, const uint8_t nonce[static CONFIG_SECURE_STORAGE_ITS_TRANSFORM_AEAD_NONCE_SIZE], size_t add_data_len, const uint8_t *add_data, size_t input_len, const uint8_t *input, size_t output_size, uint8_t *output, size_t *output_len)
Encrypts or decrypts an ITS entry.
secure_storage_its_transform_aead_get_scheme
void secure_storage_its_transform_aead_get_scheme(psa_key_type_t *key_type, psa_algorithm_t *alg)
Returns the key type and algorithm to use for the AEAD operations.
psa_status_t
int32_t psa_status_t
Function return status.
Definition
error.h:14
uint8_t
__UINT8_TYPE__ uint8_t
Definition
stdint.h:88
secure_storage_its_uid_t
The UID (caller + entry IDs) of an ITS entry.
Definition
common.h:47
common.h
Common definitions of the secure storage subsystem's ITS APIs.
subsys
secure_storage
include
internal
zephyr
secure_storage
its
transform
aead.h
Generated on
for Zephyr API by
1.17.0