Path: blob/master/thirdparty/mbedtls/include/psa/crypto_driver_common.h
9904 views
/**1* \file psa/crypto_driver_common.h2* \brief Definitions for all PSA crypto drivers3*4* This file contains common definitions shared by all PSA crypto drivers.5* Do not include it directly: instead, include the header file(s) for6* the type(s) of driver that you are implementing. For example, if7* you are writing a dynamically registered driver for a secure element,8* include `psa/crypto_se_driver.h`.9*10* This file is part of the PSA Crypto Driver Model, containing functions for11* driver developers to implement to enable hardware to be called in a12* standardized way by a PSA Cryptographic API implementation. The functions13* comprising the driver model, which driver authors implement, are not14* intended to be called by application developers.15*/1617/*18* Copyright The Mbed TLS Contributors19* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later20*/21#ifndef PSA_CRYPTO_DRIVER_COMMON_H22#define PSA_CRYPTO_DRIVER_COMMON_H2324#include <stddef.h>25#include <stdint.h>2627/* Include type definitions (psa_status_t, psa_algorithm_t,28* psa_key_type_t, etc.) and macros to build and analyze values29* of these types. */30#include "crypto_types.h"31#include "crypto_values.h"32/* Include size definitions which are used to size some arrays in operation33* structures. */34#include <psa/crypto_sizes.h>3536/** For encrypt-decrypt functions, whether the operation is an encryption37* or a decryption. */38typedef enum {39PSA_CRYPTO_DRIVER_DECRYPT,40PSA_CRYPTO_DRIVER_ENCRYPT41} psa_encrypt_or_decrypt_t;4243#endif /* PSA_CRYPTO_DRIVER_COMMON_H */444546