commit | 51585384b945d45d5446a4b9ac989b7005d6e4bb | [log] [tgz] |
---|---|---|
author | Gilles Peskine <Gilles.Peskine@arm.com> | Sat Jan 05 10:27:47 2019 +0100 |
committer | Gilles Peskine <Gilles.Peskine@arm.com> | Sat Jan 05 10:27:47 2019 +0100 |
tree | e09ff86ed7373e07f57a8b453e601f4552bb1f45 | |
parent | 8ae15ddcf8417991a5ddbcb2dc7646c5850533c8 [diff] | |
parent | d668baebc5e1709f4118aba3802d9af0ee4e4d83 [diff] |
Merge remote-tracking branch 'upstream-crypto/development' into all_sh-mbedcrypto Merge the work on all.sh that was done on mbedtls-2.14.0 with the changes from mbedtls-2.14.0 to the current tip of mbed-crypto/development. There is a merge conflict in test/scripts/all.sh, which is the only file that was modified in the all.sh work branch. I resolved it by taking the copy from the all.sh branch and applying the changes between mbedtls-2.14.0 and mbedtls-2.16.0. As evidenced by `git diff mbedtls-2.14.0 d668baebc5e1709f4118aba3802d9af0ee4e4d83`, many of the commits in `git log mbedtls-2.14.0 d668baebc5e1709f4118aba3802d9af0ee4e4d83` cancelled each other or were redundant with parallel commits that had also occured via another branch included in mbedtls-2.14.0, leaving the following differences: * Removal of one unimportant blank line. * The changes from db2b8db7150183e15169636027f87c4145e5645c "psa: Add storage implementation for files", to turn off PSA storage when MBEDTLS_FS_IO is turned off, which I manually replayed.
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.
Mbed Crypto is distributed under the Apache License, version 2.0. See the LICENSE file for the full text of the license.
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.
Since the Mbed Crypto library is a reference implementation of the PSA cryptography API, the library's API documentation is the PSA cryptography API specification. The PSA cryptography API specification consists of the following documents:
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:
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.