/mbedtls-latest/tests/suites/ |
D | test_suite_pkcs7.data | 157 PKCS7 Parse Failure Invalid ASN1: Add null byte to start #20.0 161 PKCS7 Parse Failure Invalid ASN1: Add null byte to end #21.0 165 PKCS7 Parse Failure Invalid ASN1: Change tag 30 to 02 #22.0 169 PKCS7 Parse Failure Invalid ASN1: Change length from 1280 to 1281 #23.0 173 PKCS7 Parse Failure Invalid ASN1: Change contents of tag 30 to contain one unaccounted extra byte #… 177 PKCS7 Parse Failure Invalid ASN1: Change tag 06 to 02 #25.0 181 PKCS7 Parse Failure Invalid ASN1: Change length from 9 to 10 #26.0 185 PKCS7 Parse Failure Invalid ASN1: Change length from 9 to 8 #27.0 189 PKCS7 Parse Failure Invalid ASN1: Change tag a0 to 02 #28.0 193 PKCS7 Parse Failure Invalid ASN1: Change length from 1265 to 1266 #29.0 [all …]
|
D | test_suite_psa_crypto_slot_management.data | 102 Attempt to overwrite: close before 105 Attempt to overwrite: close after 108 Attempt to overwrite: keep open 125 # We need to avoid existing volatile key IDs. Normally there aren't any 181 Copy volatile to volatile 184 Copy volatile to persistent 188 Copy persistent to volatile 192 Copy persistent to persistent 196 Copy persistent to persistent, same id but different owner 200 Copy persistent to persistent with enrollment algorithm [all …]
|
/mbedtls-latest/docs/architecture/ |
D | psa-shared-memory.md | 12 * Only PSA Crypto API functions are in scope (including Mbed TLS extensions to the official API spe… 13 …/overview/conventions.html#output-buffer-sizes). Any other data is assumed to be in non-shared mem… 19 …ion can't access another partition's memory directly. Partitions are meant to be isolated from eac… 21 …th environments where the arguments passed to a PSA Crypto API function may be in shared memory (a… 23 …to another partition, there is a risk that this other partition will access it while the crypto im… 32 * a client of the crypto service, which makes a RPC to the crypto service; 33 * in some scenarios, a client of the client, which makes a RPC to the crypto client which re-shares… 47 …to perform authenticated encryption, using a mechanism with an encrypt-and-MAC structure. The auth… 50 … output will be `enc("PPPP")+mac("QQQQ")`. There is no input that can lead to this output, hence t… 58 3. The crypto code reads the intermediate data back and continues the calculation, leading to an ou… [all …]
|
D | psa-storage-resilience.md | 5 The PSA crypto subsystem includes a persistent key store. It is possible to create a persistent key… 7 …to a system crash or power loss. That is, we assume that the underlying platform behaves nominally… 15 …or in a state where the function has returned. The application never needs to worry about an inter… 17 _Committing_ means that when a function returns, the data has been written to the persistent storag… 19 …to an external system. For example, if a key creation function in the PSA Crypto API reports to th… 23 …al Trusted Storage) interface, which exposes a simple API. There are two functions to modify files: 30 …tent of a file is always a version that was previously passed to `set()`. We do not try to handle … 34 …rations (creation or destruction) on persistent keys rely on a single call to the underlying stora… 36 The following case requires extra work related to resilience: 40 …erlying-file-storage). We do not need to take any special precautions in the library design, and w… [all …]
|
D | tls13-support.md | 90 there is rarely any need to modify the configuration from that used for 96 applicable to the TLS 1.3 implementation: 143 related to key exchange protocols, certificates and signatures. 148 to PSK based key exchange. The ephemeral key exchange mode requires at least 157 related to certificates and signatures. The PSK ephemeral key exchange 165 The following coding rules are aimed to be a checklist for TLS 1.3 upstreaming 166 work to reduce review rounds and the number of comments in each round. They 175 with `ssl_tls13_`. The same applies to structures and types that are 176 internal to C modules. 183 - The names of macros and variables related to a field or structure in the [all …]
|
D | alternative-implementations.md | 4 This document describes how parts of the Mbed TLS functionality can be replaced at compile time to … 10 …nux/POSIX-like systems and on Windows. On embedded platforms, you may need to customize some aspec… 12 …ve two mechanisms: either define `MBEDTLS_PLATFORM_XXX_MACRO` to the name of a function to call in… 24 …f the form 3.x. The interface of PSA drivers is currently still experimental and subject to change. 28 …ne), and for random generation. Calls to `psa_xxx` functions that perform cryptographic operations… 30 …to change, and not all operations support drivers yet. The configuration option `MBEDTLS_USE_PSA_C… 37 …DTLS_AES_ALT` for an implementation of the AES module. This is in addition to enabling `MBEDTLS_XX… 45 …to any C type except incomplete and array types (although they would normally be `struct` types). … 47 …to have a certain field, the field must have the same type and semantics as in the built-in implem… 54 …to move a context object in memory (except during the execution of a library function that takes t… [all …]
|
/mbedtls-latest/ |
D | LICENSE | 26 "control" means (i) the power, direct or indirect, to cause the 35 including but not limited to software source code, documentation 40 not limited to compiled object code, generated documentation, 41 and conversions to other media types. 45 copyright notice that is included in or attached to the work 53 separable from, or merely link (or bind by name) to the interfaces of, 58 to that Work or Derivative Works thereof, that is intentionally 59 submitted to Licensor for inclusion in the Work by the copyright owner 60 or by an individual or Legal Entity authorized to submit on behalf of 63 to the Licensor or its representatives, including but not limited to [all …]
|
D | README.md | 24 To generate a local copy of the library documentation in HTML format, tailored to your compile-time… 41 …velopment are CMake and GNU Make. Those systems are always complete and up-to-date. The others sho… 43 …x509 depends on libmbedcrypto. As a result, some linkers will expect flags to be in a specific ord… 47 You need the following tools to build the library with the provided makefiles: 51 * Python 3.8 to generate the test code. Python is also needed to integrate PSA drivers and to build… 52 * Perl to run the tests, and to generate some source files in the development branch. 59 …S/mbedtls-framework)). This is not needed to merely compile the library at a release tag. This is … 63 …nerated files are included in official releases. This section explains how to generate the missing… 72 …Depending on your Python installation, you may need to invoke `python` instead of `python3`. To in… 75 If you are cross-compiling, you must set the `CC` environment variable to a C compiler for the host… [all …]
|
D | ChangeLog | 34 need to enable the handling of TLS 1.3 tickets through the new 44 * The following cryptographic mechanisms are planned to be removed 52 * The following cipher suites are planned to be removed from (D)TLS 1.2 62 * The following low-level application interfaces are planned to be removed 74 For guidance on migrating application code to the PSA API, please consult 76 * The following integration interfaces are planned to be removed 91 not cause the PSA subsystem to use HMAC_DRBG: it uses HMAC_DRBG only when 106 than TLS client authentication could be able to use it for TLS client 119 passing in zero length additional data to multipart AEAD. 120 * Fix rare concurrent access bug where attempting to operate on a [all …]
|
D | CONTRIBUTING.md | 3 …community. All PRs are reviewed by the project team / community, and may need some modifications to 13 - [Backports](#long-term-support-branches): provide a backport if needed (it's fine to wait until t… 25 1. Fork the [Mbed TLS repository on GitHub](https://github.com/Mbed-TLS/mbedtls) to start making yo… 28 …feature or topic. The larger the contribution is, the longer it would take to review it and merge … 33 …to minimise the impact on users upgrading to newer versions of the library and it should not be ne… 35 …to users, where a change to the interface is required, all changes to the ABI or API, even on the … 37 …to the definition of functions in the public interface which will change the API. Instead the inte… 39 …ill be made only in a planned, structured way that gives sufficient notice to users of the library. 43 …to allow users of the library to have a maintained, stable version of the library which contains o… 45 When backporting to these branches please observe the following rules: [all …]
|
/mbedtls-latest/docs/architecture/psa-migration/ |
D | strategy.md | 2 migration to PSA Crypto and mentions future perspectives and open questions. 7 Several benefits are expected from migrating to PSA Crypto: 16 `MBEDTLS_USE_PSA_CRYPTO` is enabled. For (G2) to take effect, the application 17 needs to be changed to use new APIs. For a more detailed account of what's 25 the preceding ones to be completed. 31 We currently have a few compile-time options that are relevant to the migration: 36 controls usage of PSA Crypto APIs to perform operations in X.509 and TLS 46 - to avoid a hard/default dependency of TLS, X.509 and PK on 48 - When `MBEDTLS_PSA_CRYPTO_C` is enabled and used, applications need to call 53 currently possible to compile TLS and X.509 without any of the options. [all …]
|
D | md-cipher-dispatch.md | 6 …r code that is not subject to `MBEDTLS_USE_PSA_CRYPTO`, is currently using legacy cryptography API… 10 This is complementary to the main [strategy document](strategy.html) and is intended as a refinemen… 21 I want Mbed TLS to preserve backward compatibility, 26 As a developer of library code that uses Mbed TLS to perform cryptographic operations, 27 I want to know which functions to call and which feature macros to check, 35 I want to build Mbed TLS in a way that uses my hardware wherever relevant, 39 I want to build Mbed TLS without software that replicates what my hardware does, 40 to minimize the code size. 45 I want to have clear rules for when to use which interface, 46 to avoid bugs in “unusual” configurations. [all …]
|
D | psa-legacy-bridges.md | 10 …udience is library maintainers. See the companion document [“Transitioning to the PSA API”](../../… 16 * [ACTION] A finalized part of the design that will need to be carried out. 25 Mbed TLS is gradually shifting from the legacy API to the PSA API. Mbed TLS 4.0 will be the first v… 27 …m/Mbed-TLS/TF-PSA-Crypto). For simplicity, in this document, we just refer to the whole as “Mbed T… 37 There is functionality that is tied to one API and is not directly available in the other API: 45 …to rewrite a significant part of the code all at once. (For example, Mbed TLS itself will have tak… 49 …upport for both APIs. Therefore no special effort is necessary to allow an application to use both… 51 Special effort is necessary to use both APIs as part of the implementation of the same feature. Fro… 67 The goal of this document is to bridge the legacy API and the PSA API. The goal is not to provide a… 69 …to the legacy API, we do not consider functionality of low-level modules for individual algorithms… [all …]
|
D | testing.md | 11 There needs to be at least one build in `all.sh` that enables 14 `MBEDTLS_USE_PSA_CRYPTO`. There needs to be at least one build with 18 Generally, code review is enough to ensure that PSA APIs are indeed used where 21 However, when it comes to TLS, we also have the option of using debug messages 22 to confirm which code path is taken. This is generally unnecessary, except when 23 a decision is made at run-time about whether to use the PSA or legacy code 26 good to have a debug message checked by the test case to confirm that the 28 ciphers that are supposed to be supported.) 34 For example, `mbedtls_pk_setup_opaque()` is meant to be used by applications 35 in order to create PK contexts that can then be passed to existing TLS and [all …]
|
/mbedtls-latest/docs/ |
D | 3.0-migration-guide.md | 1 # Migrating from Mbed TLS 2.x to Mbed TLS 3.0 3 This guide details the steps required to migrate from Mbed TLS version 2.x to 6 need to change their own code in order to make it work with Mbed TLS 3.0. 18 Much of the information needed to determine a migration path can be found in the Mbed TLS 2.x docum… 24 explain how to upgrade, and should be referred to when migrating code. Where a 28 It's best to use the latest version of Mbed TLS 2.x for this purpose, which is the 2.28 LTS release. 29 So to generate the documentation, checkout the `mbedtls-2.28` branch and follow 37 has further detail on which functions this applies to. 46 … <mbedtls/build_info.h>`. Don't include `mbedtls/config.h` and don't refer to `MBEDTLS_CONFIG_FILE… 48 …arsed the library version from `include/mbedtls/version.h`, this has moved to `include/mbedtls/bui… [all …]
|
D | psa-transition.md | 1 # Transitioning to the PSA API 3 > I have code written for `mbedtls_` cryptography APIs. How do I migrate to `psa_` APIs? 7 Mbed TLS is gradually moving from legacy `mbedtls_xxx` APIs to newer `psa_xxx` APIs for cryptograph… 9 This guide is intended to help migrate existing applications that use Mbed TLS for cryptography. It… 13 This document is long, but you probably don't need to read all of it. You should start with the fol… 18 … modules](#summary-of-api-modules), the table of contents or a text search to locate the sections … 34 …to some extent. This offers applications some flexibility, but it removes flexibility from the imp… 35 * Mbed TLS legacy APIs require key material to be present in the application memory. The PSA Crypto… 36 … many legacy cryptography functions require the caller to know how large an output buffer needs to… 53 … is disabled by default). This option causes the PK, X.509 and TLS modules to use PSA crypto under… [all …]
|
D | use-psa-crypto.md | 14 **Application code:** when this option is enabled, you need to call 19 **Why enable this option:** to fully take advantage of PSA drivers in PK, 23 still use PSA drivers, if it can determine it's safe to do so; currently 32 PSA Crypto but you're not required to call `psa_crypto_init()` before calling 37 exceptions). When it is enabled, you need to call `psa_crypto_init()` before 49 You need to enable `MBEDTLS_USE_PSA_CRYPTO` if you want TLS 1.3 to use PSA 57 longer beta, and production quality, so there's no longer any reason to make 62 `MBEDTLS_USE_PSA_CRYPTO` is that the user promises to call `psa_crypto_init()` 65 as TLS 1.3, can be introduced with a requirement to call `psa_crypto_init()`. 72 **New API function:** `mbedtls_pk_setup_opaque()` - can be used to [all …]
|
/mbedtls-latest/docs/architecture/psa-thread-safety/ |
D | psa-thread-safety.md | 10 …Key slot states](#key-slot-states) section. They guarantee safe concurrent access to slot contents. 19 The other functions in the PSA Crypto API are planned to be made thread-safe in future, but current… 33 …lication can make calls to the Crypto API in separate threads. In such an environment, concurrent … 37 …ls is handled as if the effect and return code of every call is equivalent to some sequential orde… 43 …lled (see the [Initialization](#initialization) section for details on how to correctly initialize… 53 These are the conventions which are planned to be added to the PSA 1.2 specification, Mbed TLS 3.6 … 59 > * A call to `psa_destroy_key()` must not overlap with a concurrent call to any of the following f… 60 > - Any call where the same key identifier is a parameter to the call. 61 …ulti-part operation, where the same key identifier was used as a parameter to a previous step in t… 67 > The consistency requirement does not apply to errors that arise from resource failures or limitat… [all …]
|
/mbedtls-latest/docs/proposed/ |
D | psa-driver-wrappers-codegen-migration-guide.md | 1 Migrating to an auto generated psa_crypto_driver_wrappers.h file 4 This document describes how to migrate to the auto generated psa_crypto_driver_wrappers.h file. 5 It is meant to give the library user migration guidelines while the Mbed TLS project tides over mul… 24 … Driver Wrapper auto generation project is designed to use a python templating library ( Jinja2 ) … 32 …to be used for generating the psa_crypto_driver_wrappers.h file can be found at **scripts/data_fil… 33 …lating support is yet to come in, if the library user sees a need to patch psa_crypto_driver_wrapp… 35 #### How to set your driver up 37 Please refer to psa-driver-interface.md for information on how a driver schema can be written. 38 One can also refer to the example test drivers/ JSON schemas under **scripts/data_files/driver_json… 40 …to be edited by the user to reflect the drivers one wants to use on a device. The order in which t…
|
D | psa-conditional-inclusion-c.md | 4 This document is a proposed interface for deciding at build time which cryptographic mechanisms to … 12 …use case, it is often desirable to include only a subset of the available cryptographic mechanisms… 14 The present document proposes a way for an application using the PSA cryptography interface to decl… 18 …to select which cryptographic mechanisms are included in a build through its configuration file (`… 24 …to adapt to the PSA interface for several reasons. The `MBEDTLS_xxx_ALT` symbols are somewhat inco… 34 …he build does not require tools other than a C compiler. This is necessary to allow building an ap… 40 … and a block permutation (AES, CAMELLIA, ARIA, …), there is no requirement to include only specifi… 42 …ctions (for example encrypt/decrypt, sign/verify), there is no requirement to include only one dir… 44 [Limitation.size] There is no requirement to include only support for certain key sizes. 46 …] Where there are multiple ways to perform an operation, for example single-part and multi-part, t… [all …]
|
D | psa-driver-interface.md | 6 …ication is work in progress and should be considered to be in a beta stage. There is ongoing work … 14 The PSA Cryptography API defines an interface that allows applications to perform cryptographic ope… 16 …to be built compositionally. An implementation of the PSA Cryptography API is composed of a **core… 24 …can also be pure software implementations that are distributed as plug-ins to a PSA Cryptography i… 29 The present specification was designed to fulfill the following high-level requirements. 31 [Req.plugins] It is possible to combine multiple drivers from different providers into the same imp… 33 … is possible to compile the code of each driver and of the core separately, and link them together… 39 [Req.location] Applications can tell which location values correspond to which secure element drive… 41 …at a fallback to core code may be necessary. Conversely, if an accelerator fully supports cryptogr… 49 …to implement some functions with C linkage, and to declare these functions in a **driver descripti… [all …]
|
D | psa-driver-integration-guide.md | 7 This document describes how to build Mbed TLS with additional cryptoprocessor drivers that follow t… 13 …e provides a way to build Mbed TLS with additional code that implements certain cryptographic prim… 17 …N format and some code to include in the build. The driver code can either be provided in binary f… 19 ## How to build Mbed TLS with drivers 26 cd /path/to/mbedtls 27 make PSA_DRIVERS="/path/to/acme/driver.json /path/to/nadir/driver.json" lib 33 cd /path/to/application 34 …ld myapp.o -L/path/to/acme -lacmedriver -L/path/to/nadir -lnadirdriver -L/path/to/mbedtls -lmbedcr…
|
/mbedtls-latest/docs/architecture/testing/ |
D | invasive-testing.md | 7 The goal of this document is to identify areas where black-box testing is insufficient and to propo… 16 * [“Solutions”](#solutions) explains how we currently solve, or intend to solve, specific problems. 20 …pto/keystore and X.509 parts of the library are about. More work is needed to fully take TLS into … 24 Always follow these rules unless you have a good reason not to. If you deviate, document the ration… 34 In unit tests and in test programs, it's ok to include internal header files from `library/`. Do no… 36 Sometimes it makes sense to have unit tests on functions that aren't part of the public API. Declar… 41 > /* This test file is specific to the ITS implementation in PSA Crypto 42 > * on top of stdio. It expects to know what the stdio name of a file is 49 > # and not expected to be raised any time soon) is less than the maximum 55 If the most practical way to test something is to add code to the product that is only useful for t… [all …]
|
/mbedtls-latest/programs/ |
D | README.md | 20 … for any of the supported public-key algorithms (RSA or ECC) and writes it to a file that can be u… 24 …writer.c): loads a PEM or DER public key or private key file and writes it to a new PEM or DER fil… 26 …pk_decrypt.c): loads a PEM or DER public/private key file and uses the key to encrypt/decrypt a sh… 28 …/pk_verify.c): loads a PEM or DER private/public key file and uses the key to sign/verify a short … 34 …crypt.c`](pkey/rsa_decrypt.c): loads an RSA public/private key and uses it to encrypt/decrypt a sh… 36 * [`pkey/rsa_genkey.c`](pkey/rsa_genkey.c): generates an RSA key and writes it to a file that can b… 38 …verify.c`](pkey/rsa_verify.c): loads an RSA private/public key and uses it to sign/verify a short … 40 …ss.c`](pkey/rsa_verify_pss.c): loads an RSA private/public key and uses it to sign/verify a short … 44 …This pair of programs illustrates how to set up a secure channel using RSA for authentication and … 50 * [`pkey/dh_genprime.c`](pkey/dh_genprime.c): shows how to use the bignum (`mpi`) interface to gene… [all …]
|
/mbedtls-latest/3rdparty/p256-m/p256-m/ |
D | README.md | 3 to files that are not present/relevant here.* 6 especially suited to constrained 32-bit environments. It's written in standard 17 because I wanted to see what happened when reversing the usual emphasis. 21 to existing implementations (see below) - in less than 700 LOC. 47 - In addition, crafted inputs are used for negative testing and to reach 70 Its has been [pointed out](https://safecurves.cr.yp.to/) that the NIST curves, 72 risk for the implementation to: 81 In addition to the above correctness claims, p256-m has the following 90 In addition to avoiding branches and memory accesses depending on secret data, 96 be defined by the user at compile-time to take advantage of it in order to [all …]
|