Mistake on this page?
Report an issue in GitHub or email us
crypto_driver_common.h
Go to the documentation of this file.
1 /**
2  * \file psa/crypto_driver_common.h
3  * \brief Definitions for all PSA crypto drivers
4  *
5  * This file contains common definitions shared by all PSA crypto drivers.
6  * Do not include it directly: instead, include the header file(s) for
7  * the type(s) of driver that you are implementing. For example, if
8  * you are writing a driver for a chip that provides both a hardware
9  * random generator and an accelerator for some cryptographic algorithms,
10  * include `psa/crypto_entropy_driver.h` and `psa/crypto_accel_driver.h`.
11  *
12  * This file is part of the PSA Crypto Driver Model, containing functions for
13  * driver developers to implement to enable hardware to be called in a
14  * standardized way by a PSA Cryptographic API implementation. The functions
15  * comprising the driver model, which driver authors implement, are not
16  * intended to be called by application developers.
17  */
18 
19 /*
20  * Copyright The Mbed TLS Contributors
21  * SPDX-License-Identifier: Apache-2.0
22  *
23  * Licensed under the Apache License, Version 2.0 (the "License"); you may
24  * not use this file except in compliance with the License.
25  * You may obtain a copy of the License at
26  *
27  * http://www.apache.org/licenses/LICENSE-2.0
28  *
29  * Unless required by applicable law or agreed to in writing, software
30  * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
31  * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
32  * See the License for the specific language governing permissions and
33  * limitations under the License.
34  */
35 #ifndef PSA_CRYPTO_DRIVER_COMMON_H
36 #define PSA_CRYPTO_DRIVER_COMMON_H
37 
38 #include <stddef.h>
39 #include <stdint.h>
40 
41 /* Include type definitions (psa_status_t, psa_algorithm_t,
42  * psa_key_type_t, etc.) and macros to build and analyze values
43  * of these types. */
44 #include "crypto_types.h"
45 #include "crypto_values.h"
46 
47 /** For encrypt-decrypt functions, whether the operation is an encryption
48  * or a decryption. */
49 typedef enum {
50  PSA_CRYPTO_DRIVER_DECRYPT,
51  PSA_CRYPTO_DRIVER_ENCRYPT
53 
54 #endif /* PSA_CRYPTO_DRIVER_COMMON_H */
psa_encrypt_or_decrypt_t
For encrypt-decrypt functions, whether the operation is an encryption or a decryption.
Important Information for this Arm website

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies. If you are not happy with the use of these cookies, please review our Cookie Policy to learn how they can be disabled. By disabling cookies, some features of the site will not work.