blob: fb548c5a43a1118b7121d579271da4f99714b38e [file] [log] [blame]
Julian Halld4071382021-07-07 16:45:53 +01001/*
2 * Copyright (c) 2021, Arm Limited and Contributors. All rights reserved.
3 *
4 * SPDX-License-Identifier: BSD-3-Clause
5 */
6
7#include <string.h>
8#include <stdlib.h>
9#include <psa/crypto.h>
10#include "psa_crypto_client.h"
11#include <protocols/rpc/common/packed-c/status.h>
12#include <protocols/service/crypto/packed-c/opcodes.h>
13#include <common/tlv/tlv.h>
14
15psa_status_t psa_aead_encrypt(psa_key_id_t key,
16 psa_algorithm_t alg,
17 const uint8_t *nonce,
18 size_t nonce_length,
19 const uint8_t *additional_data,
20 size_t additional_data_length,
21 const uint8_t *plaintext,
22 size_t plaintext_length,
23 uint8_t *ciphertext,
24 size_t ciphertext_size,
25 size_t *ciphertext_length)
26{
27 return PSA_ERROR_NOT_SUPPORTED;
28}
29
30psa_status_t psa_aead_decrypt(psa_key_id_t key,
31 psa_algorithm_t alg,
32 const uint8_t *nonce,
33 size_t nonce_length,
34 const uint8_t *additional_data,
35 size_t additional_data_length,
36 const uint8_t *ciphertext,
37 size_t ciphertext_length,
38 uint8_t *plaintext,
39 size_t plaintext_size,
40 size_t *plaintext_length)
41{
42 return PSA_ERROR_NOT_SUPPORTED;
43}
Julian Halld670b412021-07-19 15:16:27 +010044
45psa_status_t psa_aead_encrypt_setup(psa_aead_operation_t *operation,
46 psa_key_id_t key,
47 psa_algorithm_t alg)
48{
49 return PSA_ERROR_NOT_SUPPORTED;
50}
51
52psa_status_t psa_aead_decrypt_setup(psa_aead_operation_t *operation,
53 psa_key_id_t key,
54 psa_algorithm_t alg)
55{
56 return PSA_ERROR_NOT_SUPPORTED;
57}
58
59psa_status_t psa_aead_generate_nonce(psa_aead_operation_t *operation,
60 uint8_t *nonce,
61 size_t nonce_size,
62 size_t *nonce_length)
63{
64 return PSA_ERROR_NOT_SUPPORTED;
65}
66
67psa_status_t psa_aead_set_nonce(psa_aead_operation_t *operation,
68 const uint8_t *nonce,
69 size_t nonce_length)
70{
71 return PSA_ERROR_NOT_SUPPORTED;
72}
73
74psa_status_t psa_aead_set_lengths(psa_aead_operation_t *operation,
75 size_t ad_length,
76 size_t plaintext_length)
77{
78 return PSA_ERROR_NOT_SUPPORTED;
79}
80
81psa_status_t psa_aead_update_ad(psa_aead_operation_t *operation,
82 const uint8_t *input,
83 size_t input_length)
84{
85 return PSA_ERROR_NOT_SUPPORTED;
86}
87
88psa_status_t psa_aead_update(psa_aead_operation_t *operation,
89 const uint8_t *input,
90 size_t input_length,
91 uint8_t *output,
92 size_t output_size,
93 size_t *output_length)
94{
95 return PSA_ERROR_NOT_SUPPORTED;
96}
97
98psa_status_t psa_aead_finish(psa_aead_operation_t *operation,
99 uint8_t *ciphertext,
100 size_t ciphertext_size,
101 size_t *ciphertext_length,
102 uint8_t *tag,
103 size_t tag_size,
104 size_t *tag_length)
105{
106 return PSA_ERROR_NOT_SUPPORTED;
107}
108
109psa_status_t psa_aead_verify(psa_aead_operation_t *operation,
110 uint8_t *plaintext,
111 size_t plaintext_size,
112 size_t *plaintext_length,
113 const uint8_t *tag,
114 size_t tag_length)
115{
116 return PSA_ERROR_NOT_SUPPORTED;
117}
118
119psa_status_t psa_aead_abort(psa_aead_operation_t *operation)
120{
121 return PSA_ERROR_NOT_SUPPORTED;
122}