blob: 09d3b44be38aea840ef60a00063ad085802856cc [file] [log] [blame]
Ashutosh Singhf4d88672017-11-29 13:35:43 +00001/*
Mate Toth-Pal7de74b52018-02-23 15:46:47 +01002 * Copyright (c) 2017-2018, Arm Limited. All rights reserved.
Ashutosh Singhf4d88672017-11-29 13:35:43 +00003 *
4 * SPDX-License-Identifier: BSD-3-Clause
5 *
6 */
7
8#ifndef __TFM_SST_DEFS_H__
9#define __TFM_SST_DEFS_H__
10
11#ifdef __cplusplus
12extern "C" {
13#endif
14
15#include <inttypes.h>
16#include <limits.h>
Marc Moreno Berengue7d053a32018-06-27 18:22:14 +010017#include "psa_sst_api.h"
Ashutosh Singhf4d88672017-11-29 13:35:43 +000018
Marc Moreno Berengue675b6e92018-06-14 17:31:01 +010019/*!
Marc Moreno Berengue10d0d362018-06-18 14:15:56 +010020 * \struct tfm_sst_token_t
21 *
22 * \brief Structure to store the asset's token.
23 *
24 */
25struct tfm_sst_token_t {
26 const uint8_t *token; /*!< Pointer to the asset's token to be used to
27 * generate the asset key to encrypt and decrypt
28 * the asset data. This is an optional parameter
29 * that has to be NULL in case the token is not
30 * provied.
31 */
32 uint32_t token_size; /*!< Token size. In case the token is not provided
33 * the token size has to be 0.
34 */
35};
36
37/*!
Marc Moreno Berengue675b6e92018-06-14 17:31:01 +010038 * \struct tfm_sst_buf_t
39 *
40 * \brief Structure to store data information to read/write from/to asset.
41 *
42 */
Ashutosh Singhf4d88672017-11-29 13:35:43 +000043struct tfm_sst_buf_t {
Marc Moreno Berengue675b6e92018-06-14 17:31:01 +010044 uint8_t *data; /*!< Address of input/output data */
Ashutosh Singhf4d88672017-11-29 13:35:43 +000045 uint32_t size; /*!< Size of input/output data */
46 uint32_t offset; /*!< Offset within asset */
47};
48
Ashutosh Singhf4d88672017-11-29 13:35:43 +000049#ifdef __cplusplus
50}
51#endif
52
53#endif /* __TFM_SST_DEFS_H__ */