|
Mbed TLS v4.1.1
|
PSA crypto configuration options (set of defines). More...

Go to the source code of this file.
PSA crypto configuration options (set of defines).
Definition in file crypto_config.h.
| #define MBEDTLS_AESCE_C |
Enable AES cryptographic extension support on Armv8.
Module: drivers/builtin/src/aesce.c Caller: drivers/builtin/src/aes.c
Requires: The AES built-in implementation
CFLAGS must be set to a minimum of -march=armv8-a+crypto for armclang <= 6.9This module adds support for the AES Armv8-A Cryptographic Extensions on Armv8 systems.
Definition at line 1520 of file crypto_config.h.
| #define MBEDTLS_AESNI_C |
Enable AES-NI support on x86-64 or x86-32.
Module: drivers/builtin/src/aesni.c Caller: drivers/builtin/src/aes.c
Requires: MBEDTLS_HAVE_ASM (on some platforms, see note)
This modules adds support for the AES-NI instructions on x86.
Definition at line 1494 of file crypto_config.h.
| #define MBEDTLS_ASN1_PARSE_C |
Enable the generic ASN1 parser.
Module: utilities/asn1parse.c Caller: extras/pkparse.c utilities/pkcs5.c
Definition at line 917 of file crypto_config.h.
| #define MBEDTLS_ASN1_WRITE_C |
Enable the generic ASN1 writer.
Module: utilities/asn1write.c Caller: drivers/builtin/src/ecdsa.c extras/pkwrite.c
Definition at line 928 of file crypto_config.h.
| #define MBEDTLS_BASE64_C |
Enable the Base64 module.
Module: utilities/base64.c Caller: utilities/pem.c
This module is required for PEM support (required by X.509).
Definition at line 940 of file crypto_config.h.
| #define MBEDTLS_CTR_DRBG_C |
Enable the CTR_DRBG AES-based random generator. The CTR_DRBG generator uses AES-256 by default. To use AES-128 instead, set MBEDTLS_PSA_CRYPTO_RNG_STRENGTH to 128.
AES support can either be achieved through built-in AES or PSA. Built-in is the default option when present otherwise PSA is used.
Module: drivers/builtin/src/ctr_drbg.c
Requires: MBEDTLS_PSA_CRYPTO_C, PSA_WANT_KEY_TYPE_AES and PSA_WANT_ALG_ECB_NO_PADDING
This module provides the CTR_DRBG AES random number generator.
Definition at line 997 of file crypto_config.h.
| #define MBEDTLS_DEPRECATED_WARNING |
Mark deprecated functions and features so that they generate a warning if used. Functionality deprecated in one version will usually be removed in the next version. You can enable this to help you prepare the transition to a new major version by making sure your code is not using this functionality.
This only works with GCC and Clang. With other compilers, you may want to use MBEDTLS_DEPRECATED_REMOVED
Uncomment to get warnings on using deprecated functions and features.
Definition at line 608 of file crypto_config.h.
| #define MBEDTLS_ECP_NIST_OPTIM |
Enable the verified implementations of ECDH primitives from Project Everest (currently only Curve25519).
The Everest code is provided under the Apache 2.0 license only; therefore enabling this option is not compatible with taking the library under the GPL v2.0-or-later license.
Enable specific 'modulo p' routines for each NIST prime. Depending on the prime and architecture, makes operations 4 to 8 times faster on the corresponding curve.
Comment this macro to disable NIST curves optimisation.
Definition at line 1638 of file crypto_config.h.
| #define MBEDTLS_FS_IO |
Enable functions that use the filesystem.
Definition at line 177 of file crypto_config.h.
| #define MBEDTLS_HAVE_ASM |
The compiler has support for asm().
Requires support for asm() in compiler.
Used in: drivers/builtin/src/aesni.h drivers/builtin/src/aria.c drivers/builtin/src/bn_mul.h utilities/constant_time.c
Required by: MBEDTLS_AESCE_C MBEDTLS_AESNI_C (on some platforms)
Comment to disable the use of assembly code.
Definition at line 1728 of file crypto_config.h.
| #define MBEDTLS_HAVE_TIME |
System has time.h and time(). The time does not need to be correct, only time differences are used, by contrast with MBEDTLS_HAVE_TIME_DATE
Defining MBEDTLS_HAVE_TIME allows you to specify MBEDTLS_PLATFORM_TIME_ALT, MBEDTLS_PLATFORM_TIME_MACRO, MBEDTLS_PLATFORM_TIME_TYPE_MACRO and MBEDTLS_PLATFORM_STD_TIME.
Comment if your system does not support time functions.
Definition at line 192 of file crypto_config.h.
| #define MBEDTLS_HAVE_TIME_DATE |
System has time.h, time(), and an implementation for mbedtls_platform_gmtime_r() (see below). The time needs to be correct (not necessarily very accurate, but at least the date should be correct). This is used to verify the validity period of X.509 certificates.
Comment if your system does not have a correct clock.
Definition at line 213 of file crypto_config.h.
| #define MBEDTLS_HMAC_DRBG_C |
Enable the HMAC_DRBG random generator.
Module: drivers/builtin/src/hmac_drbg.c Caller:
Requires: MBEDTLS_MD_C
Uncomment to enable the HMAC_DRBG random number generator.
Definition at line 1058 of file crypto_config.h.
| #define MBEDTLS_LMS_C |
Enable the LMS stateful-hash asymmetric signature algorithm.
Module: extras/lms.c Caller:
Requires: MBEDTLS_PSA_CRYPTO_C
Uncomment to enable the LMS verification algorithm and public key operations.
Definition at line 773 of file crypto_config.h.
| #define MBEDTLS_MD_C |
Enable the generic layer for message digest (hashing).
Requires: MBEDTLS_PSA_CRYPTO_C with at least one hash. Module: extras/md.c Caller: drivers/builtin/src/ecdsa.c drivers/builtin/src/ecjpake.c drivers/builtin/src/hmac_drbg.c drivers/builtin/src/psa_crypto_ecp.c drivers/builtin/src/psa_crypto_rsa.c drivers/builtin/src/rsa.c extras/pk.c utilities/constant_time.c utilities/pkcs5.c
Uncomment to enable generic message digest wrappers.
Definition at line 806 of file crypto_config.h.
| #define MBEDTLS_NIST_KW_C |
Enable the 128-bit key wrapping modes from NIST SP 800-38F: KW (also known as RFC 3394) and KWP (RFC 5649). Currently these modes are only supported with AES.
Module: extras/nist_kw.c
Auto enables: PSA_WANT_ALG_ECB_NO_PADDING
Definition at line 819 of file crypto_config.h.
| #define MBEDTLS_PEM_PARSE_C |
Enable PEM decoding / parsing.
Module: utilities/pem.c Caller: extras/pkparse.c
Requires: MBEDTLS_BASE64_C optionally PSA_WANT_ALG_MD5
This modules adds support for decoding / parsing PEM files.
Definition at line 955 of file crypto_config.h.
| #define MBEDTLS_PEM_WRITE_C |
Enable PEM encoding / writing.
Module: utilities/pem.c Caller: extras/pkwrite.c
Requires: MBEDTLS_BASE64_C
This modules adds support for encoding / writing PEM files.
Definition at line 969 of file crypto_config.h.
| #define MBEDTLS_PK_C |
Enable the generic public (asymmetric) key layer.
Module: extras/pk.c Caller: drivers/builtin/src/psa_crypto_rsa.c
Requires: #MBEDTLS_PSA_CRYPTO_CLIENT and at least one between PSA_WANT_KEY_TYPE_RSA_PUBLIC_KEY and PSA_WANT_KEY_TYPE_ECC_PUBLIC_KEY.
Uncomment to enable generic public key wrappers.
Definition at line 835 of file crypto_config.h.
| #define MBEDTLS_PK_PARSE_C |
Enable the generic public (asymmetric) key parser.
Module: extras/pkparse.c
Requires: MBEDTLS_ASN1_PARSE_C, MBEDTLS_PK_C
Uncomment to enable generic public key parse functions.
Definition at line 861 of file crypto_config.h.
| #define MBEDTLS_PK_PARSE_EC_COMPRESSED |
Enable the support for parsing public keys of type Short Weierstrass (PSA_ECC_FAMILY_SECP_XXX and PSA_ECC_FAMILY_BRAINPOOL_XXX) which are using the compressed point format.
Definition at line 884 of file crypto_config.h.
| #define MBEDTLS_PK_PARSE_EC_EXTENDED |
Enhance support for reading EC keys using variants of SEC1 not allowed by RFC 5915 and RFC 5480.
Currently this means parsing the SpecifiedECDomain choice of EC parameters (only known groups are supported, not arbitrary domains, to avoid validation issues).
Disable if you only need to support RFC 5915 + 5480 key formats.
Definition at line 875 of file crypto_config.h.
| #define MBEDTLS_PK_WRITE_C |
Enable the generic public (asymmetric) key writer.
Module: extras/pkwrite.c
Requires: MBEDTLS_ASN1_WRITE_C, MBEDTLS_PK_C
Uncomment to enable generic public key write functions.
Definition at line 897 of file crypto_config.h.
| #define MBEDTLS_PKCS5_C |
Enable PKCS#5 functions.
Module: utilities/pkcs5.c
Auto-enables: MBEDTLS_MD_C
This module adds support for the PKCS#5 functions.
Definition at line 848 of file crypto_config.h.
| #define MBEDTLS_PLATFORM_C |
Enable the platform abstraction layer that allows you to re-assign functions like calloc(), free(), snprintf(), printf(), fprintf(), exit().
Enabling MBEDTLS_PLATFORM_C enables to use of MBEDTLS_PLATFORM_XXX_ALT or MBEDTLS_PLATFORM_XXX_MACRO directives, allowing the functions mentioned above to be specified at runtime or compile time respectively.
Module: platform/platform.c Caller: Most other .c files
This module enables abstraction of common (libc) functions.
Definition at line 258 of file crypto_config.h.
| #define MBEDTLS_PSA_BUILTIN_GET_ENTROPY |
Enable entropy sources for which the library has a built-in driver.
Requires: MBEDTLS_PSA_CRYPTO_C, !MBEDTLS_PSA_CRYPTO_EXTERNAL_RNG
These are:
You should enable this option if your platform has one of these. If not:
Definition at line 1138 of file crypto_config.h.
| #define MBEDTLS_PSA_CRYPTO_C |
Enable the Platform Security Architecture cryptography API.
Module: core/psa_crypto.c
Requires: one of the following:
If MBEDTLS_CTR_DRBG_C or MBEDTLS_HMAC_DRBG_C is used as the PSA random generator, then either PSA_WANT_ALG_SHA_256 or PSA_WANT_ALG_SHA_512 must be enabled for the entropy module.
A future version may reevaluate the prioritization of DRBG mechanisms.
Definition at line 1085 of file crypto_config.h.
| #define MBEDTLS_PSA_CRYPTO_STORAGE_C |
Enable the Platform Security Architecture persistent key storage.
Module: core/psa_crypto_storage.c
Requires: MBEDTLS_PSA_CRYPTO_C, either MBEDTLS_PSA_ITS_FILE_C or a native implementation of the PSA ITS interface
Definition at line 1254 of file crypto_config.h.
| #define MBEDTLS_PSA_ITS_FILE_C |
Enable the emulation of the Platform Security Architecture Internal Trusted Storage (PSA ITS) over files.
Module: core/psa_its_file.c
Requires: MBEDTLS_FS_IO
Definition at line 1294 of file crypto_config.h.
| #define MBEDTLS_PSA_KEY_STORE_DYNAMIC |
Dynamically resize the PSA key store to accommodate any number of volatile keys (until the heap memory is exhausted).
If this option is disabled, the key store has a fixed size MBEDTLS_PSA_KEY_SLOT_COUNT for volatile keys and loaded persistent keys together.
This option has no effect when MBEDTLS_PSA_CRYPTO_C is disabled.
Module: core/psa_crypto.c Requires: MBEDTLS_PSA_CRYPTO_C
Definition at line 1311 of file crypto_config.h.
| #define MBEDTLS_SELF_TEST |
Enable the checkup functions (*_self_test).
Definition at line 684 of file crypto_config.h.
| #define MBEDTLS_THREADING_C |
Enable the threading abstraction layer.
Module: platform/threading.c
This allows different threading implementations (built-in or provided externally).
You will have to enable either #MBEDTLS_THREADING_ALT or MBEDTLS_THREADING_PTHREAD.
Enable this layer to allow use of mutexes within Mbed TLS
Definition at line 470 of file crypto_config.h.
| #define MBEDTLS_THREADING_PTHREAD |
Enable the pthread wrapper layer for the threading layer.
Requires: MBEDTLS_THREADING_C
Uncomment this to enable pthread mutexes.
Definition at line 447 of file crypto_config.h.
| #define PSA_WANT_ALG_CBC_NO_PADDING 1 |
Definition at line 48 of file crypto_config.h.
| #define PSA_WANT_ALG_CBC_PKCS7 1 |
Definition at line 49 of file crypto_config.h.
| #define PSA_WANT_ALG_CCM 1 |
Definition at line 50 of file crypto_config.h.
| #define PSA_WANT_ALG_CCM_STAR_NO_TAG 1 |
Definition at line 51 of file crypto_config.h.
| #define PSA_WANT_ALG_CFB 1 |
Definition at line 53 of file crypto_config.h.
| #define PSA_WANT_ALG_CHACHA20_POLY1305 1 |
Definition at line 54 of file crypto_config.h.
| #define PSA_WANT_ALG_CMAC 1 |
Definition at line 52 of file crypto_config.h.
| #define PSA_WANT_ALG_CTR 1 |
Definition at line 55 of file crypto_config.h.
| #define PSA_WANT_ALG_DETERMINISTIC_ECDSA 1 |
Definition at line 56 of file crypto_config.h.
| #define PSA_WANT_ALG_ECB_NO_PADDING 1 |
Definition at line 57 of file crypto_config.h.
| #define PSA_WANT_ALG_ECDH 1 |
Definition at line 58 of file crypto_config.h.
| #define PSA_WANT_ALG_ECDSA 1 |
Definition at line 60 of file crypto_config.h.
| #define PSA_WANT_ALG_FFDH 1 |
Definition at line 59 of file crypto_config.h.
| #define PSA_WANT_ALG_GCM 1 |
Definition at line 62 of file crypto_config.h.
| #define PSA_WANT_ALG_HKDF 1 |
Definition at line 63 of file crypto_config.h.
| #define PSA_WANT_ALG_HKDF_EXPAND 1 |
Definition at line 65 of file crypto_config.h.
| #define PSA_WANT_ALG_HKDF_EXTRACT 1 |
Definition at line 64 of file crypto_config.h.
| #define PSA_WANT_ALG_HMAC 1 |
Definition at line 66 of file crypto_config.h.
| #define PSA_WANT_ALG_JPAKE 1 |
Definition at line 61 of file crypto_config.h.
| #define PSA_WANT_ALG_MD5 1 |
Definition at line 67 of file crypto_config.h.
| #define PSA_WANT_ALG_OFB 1 |
Definition at line 68 of file crypto_config.h.
| #define PSA_WANT_ALG_PBKDF2_AES_CMAC_PRF_128 1 |
Definition at line 70 of file crypto_config.h.
| #define PSA_WANT_ALG_PBKDF2_HMAC 1 |
Definition at line 69 of file crypto_config.h.
| #define PSA_WANT_ALG_RIPEMD160 1 |
Definition at line 71 of file crypto_config.h.
| #define PSA_WANT_ALG_RSA_OAEP 1 |
Definition at line 72 of file crypto_config.h.
| #define PSA_WANT_ALG_RSA_PKCS1V15_CRYPT 1 |
Definition at line 73 of file crypto_config.h.
| #define PSA_WANT_ALG_RSA_PKCS1V15_SIGN 1 |
Definition at line 74 of file crypto_config.h.
| #define PSA_WANT_ALG_RSA_PSS 1 |
Definition at line 75 of file crypto_config.h.
| #define PSA_WANT_ALG_SHA3_224 1 |
Definition at line 81 of file crypto_config.h.
| #define PSA_WANT_ALG_SHA3_256 1 |
Definition at line 82 of file crypto_config.h.
| #define PSA_WANT_ALG_SHA3_384 1 |
Definition at line 83 of file crypto_config.h.
| #define PSA_WANT_ALG_SHA3_512 1 |
Definition at line 84 of file crypto_config.h.
| #define PSA_WANT_ALG_SHA_1 1 |
Definition at line 76 of file crypto_config.h.
| #define PSA_WANT_ALG_SHA_224 1 |
Definition at line 77 of file crypto_config.h.
| #define PSA_WANT_ALG_SHA_256 1 |
Definition at line 78 of file crypto_config.h.
| #define PSA_WANT_ALG_SHA_384 1 |
Definition at line 79 of file crypto_config.h.
| #define PSA_WANT_ALG_SHA_512 1 |
Definition at line 80 of file crypto_config.h.
| #define PSA_WANT_ALG_SHAKE128 1 |
Definition at line 89 of file crypto_config.h.
| #define PSA_WANT_ALG_SHAKE256 1 |
Definition at line 90 of file crypto_config.h.
| #define PSA_WANT_ALG_STREAM_CIPHER 1 |
Definition at line 85 of file crypto_config.h.
| #define PSA_WANT_ALG_TLS12_ECJPAKE_TO_PMS 1 |
Definition at line 88 of file crypto_config.h.
| #define PSA_WANT_ALG_TLS12_PRF 1 |
Definition at line 86 of file crypto_config.h.
| #define PSA_WANT_ALG_TLS12_PSK_TO_MS 1 |
Definition at line 87 of file crypto_config.h.
| #define PSA_WANT_DH_RFC7919_2048 1 |
Definition at line 104 of file crypto_config.h.
| #define PSA_WANT_DH_RFC7919_3072 1 |
Definition at line 105 of file crypto_config.h.
| #define PSA_WANT_DH_RFC7919_4096 1 |
Definition at line 106 of file crypto_config.h.
| #define PSA_WANT_DH_RFC7919_6144 1 |
Definition at line 107 of file crypto_config.h.
| #define PSA_WANT_DH_RFC7919_8192 1 |
Definition at line 108 of file crypto_config.h.
| #define PSA_WANT_ECC_BRAINPOOL_P_R1_256 1 |
Definition at line 92 of file crypto_config.h.
| #define PSA_WANT_ECC_BRAINPOOL_P_R1_384 1 |
Definition at line 93 of file crypto_config.h.
| #define PSA_WANT_ECC_BRAINPOOL_P_R1_512 1 |
Definition at line 94 of file crypto_config.h.
| #define PSA_WANT_ECC_MONTGOMERY_255 1 |
Definition at line 95 of file crypto_config.h.
| #define PSA_WANT_ECC_MONTGOMERY_448 1 |
Definition at line 96 of file crypto_config.h.
| #define PSA_WANT_ECC_SECP_K1_256 1 |
Definition at line 97 of file crypto_config.h.
| #define PSA_WANT_ECC_SECP_R1_256 1 |
Definition at line 100 of file crypto_config.h.
| #define PSA_WANT_ECC_SECP_R1_384 1 |
Definition at line 101 of file crypto_config.h.
| #define PSA_WANT_ECC_SECP_R1_521 1 |
Definition at line 102 of file crypto_config.h.
| #define PSA_WANT_KEY_TYPE_AES 1 |
Definition at line 114 of file crypto_config.h.
| #define PSA_WANT_KEY_TYPE_ARIA 1 |
Definition at line 115 of file crypto_config.h.
| #define PSA_WANT_KEY_TYPE_CAMELLIA 1 |
Definition at line 116 of file crypto_config.h.
| #define PSA_WANT_KEY_TYPE_CHACHA20 1 |
Definition at line 117 of file crypto_config.h.
| #define PSA_WANT_KEY_TYPE_DERIVE 1 |
Definition at line 110 of file crypto_config.h.
| #define PSA_WANT_KEY_TYPE_DH_KEY_PAIR_BASIC 1 |
Definition at line 142 of file crypto_config.h.
| #define PSA_WANT_KEY_TYPE_DH_KEY_PAIR_EXPORT 1 |
Definition at line 144 of file crypto_config.h.
| #define PSA_WANT_KEY_TYPE_DH_KEY_PAIR_GENERATE 1 |
Definition at line 145 of file crypto_config.h.
| #define PSA_WANT_KEY_TYPE_DH_KEY_PAIR_IMPORT 1 |
Definition at line 143 of file crypto_config.h.
| #define PSA_WANT_KEY_TYPE_DH_PUBLIC_KEY 1 |
Definition at line 119 of file crypto_config.h.
| #define PSA_WANT_KEY_TYPE_ECC_KEY_PAIR_BASIC 1 |
Definition at line 130 of file crypto_config.h.
| #define PSA_WANT_KEY_TYPE_ECC_KEY_PAIR_DERIVE 1 |
Definition at line 134 of file crypto_config.h.
| #define PSA_WANT_KEY_TYPE_ECC_KEY_PAIR_EXPORT 1 |
Definition at line 132 of file crypto_config.h.
| #define PSA_WANT_KEY_TYPE_ECC_KEY_PAIR_GENERATE 1 |
Definition at line 133 of file crypto_config.h.
| #define PSA_WANT_KEY_TYPE_ECC_KEY_PAIR_IMPORT 1 |
Definition at line 131 of file crypto_config.h.
| #define PSA_WANT_KEY_TYPE_ECC_PUBLIC_KEY 1 |
Definition at line 118 of file crypto_config.h.
| #define PSA_WANT_KEY_TYPE_HMAC 1 |
Definition at line 113 of file crypto_config.h.
| #define PSA_WANT_KEY_TYPE_PASSWORD 1 |
Definition at line 111 of file crypto_config.h.
| #define PSA_WANT_KEY_TYPE_PASSWORD_HASH 1 |
Definition at line 112 of file crypto_config.h.
| #define PSA_WANT_KEY_TYPE_RAW_DATA 1 |
Definition at line 120 of file crypto_config.h.
| #define PSA_WANT_KEY_TYPE_RSA_KEY_PAIR_BASIC 1 |
Definition at line 136 of file crypto_config.h.
| #define PSA_WANT_KEY_TYPE_RSA_KEY_PAIR_EXPORT 1 |
Definition at line 138 of file crypto_config.h.
| #define PSA_WANT_KEY_TYPE_RSA_KEY_PAIR_GENERATE 1 |
Definition at line 139 of file crypto_config.h.
| #define PSA_WANT_KEY_TYPE_RSA_KEY_PAIR_IMPORT 1 |
Definition at line 137 of file crypto_config.h.
| #define PSA_WANT_KEY_TYPE_RSA_PUBLIC_KEY 1 |
Definition at line 121 of file crypto_config.h.
| #define TF_PSA_CRYPTO_CONFIG_VERSION 0x01000000 |
This file determines which cryptographic mechanisms are enabled through the PSA Cryptography API (psa_xxx() functions).
To enable a cryptographic mechanism, uncomment the definition of the corresponding PSA_WANT_xxx preprocessor symbol. To disable a cryptographic mechanism, comment out the definition of the corresponding PSA_WANT_xxx preprocessor symbol. The names of cryptographic mechanisms correspond to values defined in psa/crypto_values.h, with the prefix PSA_WANT_ instead of PSA_.
Note that many cryptographic mechanisms involve two symbols: one for the key type (PSA_WANT_KEY_TYPE_xxx) and one for the algorithm (PSA_WANT_ALG_xxx). Mechanisms with additional parameters may involve additional symbols. This is an optional version symbol that enables compatibility handling of config files.
It is equal to the TF_PSA_CRYPTO_VERSION_NUMBER of the TF-PSA-Crypto version introduced the config format we want to be compatible with.
Definition at line 39 of file crypto_config.h.
| #define TF_PSA_CRYPTO_VERSION |
Enable run-time version information.
This option enables functions for getting the version of TF-PSA-Crypto at runtime defined in include/tf-psa-crypto/version.h.
Definition at line 750 of file crypto_config.h.