blob: 48606440bbc44b36c10ca2cff97b7f8ff8ce3a10 [file] [log] [blame]
Jamie Fox5592db02017-12-18 16:48:29 +00001/*
2 * Copyright (c) 2017-2018, Arm Limited. All rights reserved.
3 *
4 * SPDX-License-Identifier: BSD-3-Clause
5 *
6 */
7
8#ifndef __SST_TEST_SERVICE_SVC_H__
9#define __SST_TEST_SERVICE_SVC_H__
10
11#include <stdint.h>
12#include "tfm_sst_defs.h"
13
14#ifdef __cplusplus
15extern "C" {
16#endif
17
18/**
19 * \brief Sets-up the SST test service so that it is ready for test functions to
20 * be called.
21 *
22 * \return Returns error code as specified in \ref tfm_sst_err_t
23 */
24enum tfm_sst_err_t sst_test_service_svc_setup(void);
25
26/**
27 * \brief Performs a dummy encryption on the supplied buffer, using the key
28 * stored in the asset with the given UUID.
29 *
30 * \param[in] key_uuid UUID of asset containing key
31 * \param[in,out] buf Plaintext buffer
32 * \param[in] buf_size Size of buf
33 *
34 * \return Returns error code as specified in \ref tfm_sst_err_t
35 */
Marc Moreno Berengue4258e542018-06-18 13:55:59 +010036enum tfm_sst_err_t sst_test_service_svc_dummy_encrypt(uint32_t key_uuid,
Jamie Fox5592db02017-12-18 16:48:29 +000037 uint8_t *buf,
38 uint32_t buf_size);
39
40/**
41 * \brief Performs a dummy decryption on the supplied buffer, using the key
42 * stored in the asset with the given UUID.
43 *
44 * \param[in] key_uuid UUID of asset containing key
45 * \param[in,out] buf Ciphertext buffer
46 * \param[in] buf_size Size of buf
47 *
48 * \return Returns error code as specified in \ref tfm_sst_err_t
49 */
Marc Moreno Berengue4258e542018-06-18 13:55:59 +010050enum tfm_sst_err_t sst_test_service_svc_dummy_decrypt(uint32_t key_uuid,
Jamie Fox5592db02017-12-18 16:48:29 +000051 uint8_t *buf,
52 uint32_t buf_size);
53
54/**
55 * \brief Cleans the secure storage used by the SST test service.
56 *
57 * \return Returns error code as specified in \ref tfm_sst_err_t
58 */
59enum tfm_sst_err_t sst_test_service_svc_clean(void);
60
61#ifdef __cplusplus
62}
63#endif
64
65#endif /* __SST_TEST_SERVICE_SVC_H__ */