blob: a2096048dd2129ed014fc6d99ba79bb1b4e79065 [file] [log] [blame]
Steven Cooremancd84cb42020-07-16 20:28:36 +02001/*
2 * Function signatures for functionality that can be provided by
3 * cryptographic accelerators.
Steven Cooreman56250fd2020-09-04 13:07:15 +02004 * Warning: This file will be auto-generated in the future.
Steven Cooremancd84cb42020-07-16 20:28:36 +02005 */
Steven Cooreman2c7b2f82020-09-02 13:43:46 +02006/* Copyright The Mbed TLS Contributors
Steven Cooremancd84cb42020-07-16 20:28:36 +02007 * SPDX-License-Identifier: Apache-2.0
8 *
9 * Licensed under the Apache License, Version 2.0 (the "License"); you may
10 * not use this file except in compliance with the License.
11 * You may obtain a copy of the License at
12 *
13 * http://www.apache.org/licenses/LICENSE-2.0
14 *
15 * Unless required by applicable law or agreed to in writing, software
16 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
17 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18 * See the License for the specific language governing permissions and
19 * limitations under the License.
Steven Cooremancd84cb42020-07-16 20:28:36 +020020 */
21
22#ifndef PSA_CRYPTO_DRIVER_WRAPPERS_H
23#define PSA_CRYPTO_DRIVER_WRAPPERS_H
24
25#include "psa/crypto.h"
26#include "psa/crypto_driver_common.h"
27
Steven Cooreman37941cb2020-07-28 18:49:51 +020028/*
29 * Signature functions
30 */
Steven Cooremancd84cb42020-07-16 20:28:36 +020031psa_status_t psa_driver_wrapper_sign_hash( psa_key_slot_t *slot,
32 psa_algorithm_t alg,
33 const uint8_t *hash,
34 size_t hash_length,
35 uint8_t *signature,
36 size_t signature_size,
37 size_t *signature_length );
38
Steven Cooreman55ae2172020-07-17 19:46:15 +020039psa_status_t psa_driver_wrapper_verify_hash( psa_key_slot_t *slot,
40 psa_algorithm_t alg,
41 const uint8_t *hash,
42 size_t hash_length,
43 const uint8_t *signature,
44 size_t signature_length );
45
46psa_status_t psa_driver_wrapper_generate_key( const psa_key_attributes_t *attributes,
47 psa_key_slot_t *slot );
48
Steven Cooreman37941cb2020-07-28 18:49:51 +020049/*
50 * Cipher functions
51 */
52psa_status_t psa_driver_wrapper_cipher_encrypt(
53 psa_key_slot_t *slot,
54 psa_algorithm_t alg,
55 const uint8_t *input,
56 size_t input_length,
57 uint8_t *output,
58 size_t output_size,
59 size_t *output_length );
60
61psa_status_t psa_driver_wrapper_cipher_decrypt(
62 psa_key_slot_t *slot,
63 psa_algorithm_t alg,
64 const uint8_t *input,
65 size_t input_length,
66 uint8_t *output,
67 size_t output_size,
68 size_t *output_length );
69
70psa_status_t psa_driver_wrapper_cipher_encrypt_setup(
71 psa_cipher_operation_t *operation,
72 psa_key_slot_t *slot,
73 psa_algorithm_t alg );
74
75psa_status_t psa_driver_wrapper_cipher_decrypt_setup(
76 psa_cipher_operation_t *operation,
77 psa_key_slot_t *slot,
78 psa_algorithm_t alg );
79
80psa_status_t psa_driver_wrapper_cipher_generate_iv(
81 psa_cipher_operation_t *operation,
82 uint8_t *iv,
83 size_t iv_size,
84 size_t *iv_length );
85
86psa_status_t psa_driver_wrapper_cipher_set_iv(
87 psa_cipher_operation_t *operation,
88 const uint8_t *iv,
89 size_t iv_length );
90
91psa_status_t psa_driver_wrapper_cipher_update(
92 psa_cipher_operation_t *operation,
93 const uint8_t *input,
94 size_t input_length,
95 uint8_t *output,
96 size_t output_size,
97 size_t *output_length );
98
99psa_status_t psa_driver_wrapper_cipher_finish(
100 psa_cipher_operation_t *operation,
101 uint8_t *output,
102 size_t output_size,
103 size_t *output_length );
104
105psa_status_t psa_driver_wrapper_cipher_abort(
106 psa_cipher_operation_t *operation );
107
Steven Cooremancd84cb42020-07-16 20:28:36 +0200108#endif /* PSA_CRYPTO_DRIVER_WRAPPERS_H */
109
110/* End of automatically generated file. */