commit | 70824f2c9ea28a0c044f14d967ce21899f41441d | [log] [tgz] |
---|---|---|
author | Gilles Peskine <Gilles.Peskine@arm.com> | Wed Feb 26 19:05:33 2020 +0100 |
committer | Ronald Cron <ronald.cron@arm.com> | Thu Mar 19 14:07:55 2020 +0100 |
tree | c41c1d90433894a254748bfb1fdb17f3de5206a6 | |
parent | 4fa9f9f744f3e4f1c1d9045e952f2c42d9da32d3 [diff] |
Revert "Remove programs that depend on TLS or X.509" This reverts commit 0688e4f2668dab8ad95b734c23b35977134a6d21. Run scripts/generate_visualc_files.pl to account for the added programs.
The Mbed cryptography library is a reference implementation of the cryptography interface of the Arm Platform Security Architecture (PSA). This is a preview release of Mbed Crypto, provided for evaluation purposes only.
Arm's Platform Security Architecture (PSA) is a holistic set of threat models, security analyses, hardware and firmware architecture specifications, and an open source firmware reference implementation. PSA provides a recipe, based on industry best practice, that allows security to be consistently designed in, at both a hardware and firmware level.
The PSA cryptography API provides access to a set of cryptographic primitives. It has a dual purpose. First, it can be used in a PSA-compliant platform to build services, such as secure boot, secure storage and secure communication. Second, it can also be used independently of other PSA components on any platform.
The design goals of the PSA cryptography API include:
Mbed Crypto is a reference implementation of the PSA cryptography API. It is written in portable C.
The Mbed Crypto library implements both the legacy Mbed TLS interfaces to cryptographic primitives (mbedtls_xxx
) and the new PSA Cryptography interfaces (psa_xxx
).
Documentation for the Mbed TLS interfaces in the default library configuration is available as part of the Mbed TLS documentation.
For the PSA interfaces, please refer to the PSA Cryptography API documents linked from the PSA cryptography interfaces documentation portal for an overview of the library's interfaces and a detailed description of the types, macros and functions that it provides. The API reference is available in PDF and HTML formats.
There are currently a few deviations where the library does not yet implement the latest version of the specification. Please refer to the compliance issues on Github for an up-to-date list.
To generate a local copy of the library documentation in HTML format, tailored to your compile-time configuration:
make apidoc
.apidoc/index.html
or apidoc/modules.html
.You need the following tools to build the library with the provided makefiles:
If you have a C compiler, such as GCC or Clang, just run make
in the top-level directory to build the library, a set of unit tests and some sample programs.
To select a different compiler, set the CC
variable to the name or path of the compiler and linker (default: cc
), and set AR
to a compatible archiver (default: ar
). For example:
make CC=arm-linux-gnueabi-gcc AR=arm-linux-gnueabi-ar
The provided makefiles pass options to the compiler that assume a GCC-like command-line syntax. To use a different compiler, you may need to pass different values for CFLAGS
, WARNINGS_CFLAGS
and LDFLAGS
.
To run the unit tests on the host machine, run make test
from the top-level directory. If you are cross-compiling, copy the test executable from the tests
directory to the target machine.
Mbed Crypto supports being built as a subproject of Mbed TLS. Mbed TLS can use Mbed Crypto for its cryptography implementation by using Mbed Crypto as a subproject.
From the Mbed TLS project repository, CMake can be invoked as follows to build Mbed TLS using Mbed Crypto's libmbedcrypto
.
mkdir cmake cd cmake cmake .. -DUSE_CRYPTO_SUBMODULE=1 make -j make test
When building Mbed Crypto as a subproject of Mbed TLS, the Mbed TLS configuration file (config.h) is used, and not the Mbed Crypto configuration file.
The programs/
subdirectory contains sample programs that use the library. Please note that the goal of these sample programs is to demonstrate specific features of the library, and the code may need to be adapted to build a real-world application.
Future releases of this library will include:
Unless specifically indicated otherwise in a file, Mbed TLS files are provided under the Apache-2.0 license. See the LICENSE file for the full text of this license. Contributors must accept that their contributions are made under both the Apache-2.0 AND GPL-2.0-or-later licenses. This enables LTS (Long Term Support) branches of the software to be provided under either the Apache-2.0 OR GPL-2.0-or-later licenses.
We gratefully accept bug reports and contributions from the community. Please see the contributing guidelines for details on how to do this.
Arm welcomes feedback on the design of the API. If you think something could be improved, please open an issue on our Github repository. Alternatively, if you prefer to provide your feedback privately, please email us at mbed-crypto@arm.com
. All feedback received by email is treated confidentially.