Commit Graph

305 Commits (4b4859cbd060a205dd743990633b694270e91ebe)

Author SHA1 Message Date
Jaeden Amero b6c24e2e09 crypto: Copy legacy crypto from Mbed Crypto
Mbed TLS no longer provides legacy crypto C or H files. Obtain the files
from Mbed Crypto instead.
2019-08-16 09:20:03 +01:00
Seppo Takalo 3a96f436ea
Merge pull request #10847 from davidsaada/david_ps_add_sec_flags
PSA storage: Conform to "PSA 1.0.0" spec release
2019-07-23 12:05:22 +03:00
David Saada fb3559d841 PSA storage: Conform to "PSA 1.0.0" spec release
- Add the no confidentiality & no replay protection flags
- Add actual size parameter in PS/ITS get APIs
- Change a few size parameters from uint32_t to size_t
2019-07-14 18:50:47 +03:00
Jaeden Amero 045cd67e6d mbedtls: Update to Mbed TLS 2.18.1
Update to Mbed TLS 2.18.1 and Mbed Crypto 1.1.1.
2019-07-12 16:07:43 +01:00
Martin Kojtal d2e5941bc3
Merge pull request #10894 from dgreen-arm/update-mbedtls-makefile
Add adjust-check-config script to mbedtls importer
2019-07-04 15:01:12 +01:00
Darryl Green 8f6667d3d2 Add adjust-check-config script to mbedtls importer
In Mbed OS, there are configuration options with Mbed TLS that we
are more comfortable allowing than we do with Mbed TLS on its own.
Add a check-config adjusting script to enable removing or changing
options in check_config.h
2019-06-26 13:26:18 +01:00
Jaeden Amero 24b1768f53 crypto: Enable use on non-PSA targets
Move PSA Crypto implementation files outside of a TARGET_PSA folder,
enabling use of PSA Crypto APIs on more Mbed OS targets.
2019-06-20 16:11:22 +01:00
Jaeden Amero 1470d06811 mbedtls: PSA entropy is compatible with other entropy
When using Mbed Crypto's PSA Entropy Injection feature on Mbed OS, it is
not required to opt out of having entropy sources added to your entropy
contexts by default (via MBEDTLS_NO_DEFAULT_ENTROPY_SOURCES).

As integrated in Mbed OS, MBEDTLS_PSA_INJECT_ENTROPY is compatible with
actual entropy sources. PSA entropy injection is implemented using the
standard Mbed TLS NV Seed feature, and is as compatible with other
entropy sources as the standard Mbed TLS NV Seed feature which does
support entropy mixing.
2019-06-11 12:43:17 +01:00
Jaeden Amero 4917b10725 mbedtls: Update to Mbed TLS 2.18.0-rc3 2019-06-10 13:05:46 +01:00
Jaeden Amero 03b2c53ff6 mbedtls: Update to Mbed Crypto 1.1.0d2 2019-06-10 09:55:55 +01:00
Martin Kojtal 6a1ab73988
Merge pull request #10770 from Patater/update-to-mbedcrypto-1.1.0d1
mbed-crypto: Update to Mbed Crypto 1.1.0d1
2019-06-07 09:18:53 +01:00
Jaeden Amero 9676edd36b mbed-crypto: Update to Mbed Crypto 1.1.0d1 2019-06-05 16:39:06 +01:00
Jaeden Amero 4feb15c76a mbed-crypto: Automatically enable entropy injection
Automatically enable entropy injection when the NV Seed feature is
requested on PSA targets. Add a warning note describing the state of the
current implementation of the entropy injection API.

Fixes #10720
2019-05-31 09:11:58 +01:00
k-stachowiak 948d4379d8 Update Mbed TLS feature to 2.18.0-rc2 2019-05-28 11:00:16 +01:00
Jaeden Amero 60252b9988 mbedtls: Update to Mbed TLS 2.18.0-rc1
Update Mbed TLS to 2.18.0-rc1. Update Mbed Crypto to 1.1.0d0.
2019-05-23 14:47:42 +01:00
Jaeden Amero 262617935d mbedtls: Update submodules after checkout
When importing, after checking out the specified release, update any
submodules present.
2019-05-23 14:47:42 +01:00
Jaeden Amero ce2de9a9bf mbedtls: Fetch instead of pull
Do a git fetch of mbedtls instead of a pull. We don't need to checkout
development, only the release specified.
2019-05-23 14:47:42 +01:00
Jaeden Amero bb17408a14 mbedtls: Make imported version tag more verbose
When importing development releases of Mbed TLS into Mbed OS, it is
useful to be able to know a the particular git commit hash that was
imported. This change avoids ever creating a VERSION.txt for Mbed TLS
containing only "development", which is fairly useless since one doesn't
know where the development branch was at the time of import.
2019-05-23 14:47:42 +01:00
Jaeden Amero e3d1e27b89 mbedtls: Source crypto from Mbed Crypto
Use Mbed Crypto implementations of crypto. For example, use aes.c from
Mbed Crypto instead of the Mbed TLS copy.
2019-05-23 12:27:34 +01:00
aqin 43759c0c4b Enterprise mode + wifi configuraiton api 2019-05-08 17:52:04 +05:00
Martin Kojtal ac118eaedc
Merge pull request #10164 from Patater/tls-2.17.0
tls: Update Mbed TLS to 2.17.0
2019-03-23 16:33:52 +01:00
Jaeden Amero 20598bcea1 tls: Update Mbed TLS to 2.17.0
There are no differences from the previously imported version of Mbed
TLS other than the version number.
2019-03-19 16:55:56 +00:00
Jaeden Amero 11ef5a0a72 crypto: Update Mbed Crypto to 1.0.0
There are no differences from Mbed Crypto 1.0.0d7 other than the version
number.
2019-03-18 16:17:02 +00:00
avolinski f976ce3c18 Temporary disable Crypto HW accelerator on STM32F439xI chipset due to issue: https://github.com/ARMmbed/mbed-os/issues/10095 2019-03-14 17:00:06 +02:00
Simon Butcher 5285b39c01 Update Mbed TLS to the latest development version
This updates Mbed TLS to the latest development version, commit 535ee4a35b9c
in the Mbed TLS repo.
2019-03-03 23:04:00 +00:00
Simon Butcher 86825a65b6 Move the Mbed TLS target to the development branch
Before moving to the new release of Mbed TLS, this moves the default imported
version of Mbed TLS to the development branch, and will import the HEAD of the
branch, not just a specific release.
2019-03-03 22:59:00 +00:00
Simon Butcher 21c6c90519 Make the storage configs dependent on the PSA label
This commit makes the storage configurations - setting
MBEDTLS_PSA_CRYPTO_STORAGE_C, MBEDTLS_PSA_CRYPTO_STORAGE_ITS_C and unsetting
MBEDTLS_PSA_CRYPTO_STORAGE_FILE_C - dependent on the PSA label being defined for
the target.

Previously these symbols were always defined for all platforms which could
cause problems for targets that don't yet support PSA.
2019-03-03 22:55:38 +00:00
Jaeden Amero d63677f207 crypto: Update to Mbed Crypto 1.0.0d7 2019-02-27 07:24:50 +00:00
Jaeden Amero e5c1e0b7a7 crypto: Update to Mbed Crypto 1.0.0d6 2019-02-22 09:54:01 +00:00
Jaeden Amero c101a224bc crypto: Update to Mbed Crypto 1.0.0d5 2019-02-22 09:53:59 +00:00
David Saada 41eb5cbfd9 Implement PSA protected storage & restructure PSA storage implementation
- Move all PSA storage code under psa/storage directory
- Create a global PSA error codes header, eliminating ITS specific ones
- Create a common header file for PSA storage type definitions,
  eliminating ITS specific ones
- Create a common implementation for PS & ITS
- Implement protected storage feature
- Change ITS test to be common to PS as well
2019-02-21 20:58:59 +02:00
Jaeden Amero fdc57f88cf crypto: Update to Mbed Crypto 1.0.0d4 2019-02-20 22:21:16 +02:00
Jaeden Amero 4a25069611 crypto: Update Mbed Crypto to 1.0.0d3 2019-02-20 11:31:30 +02:00
Ron Eldor 77f9faf46c Use a mutex in platform setup \ teardown functions
Use a singleton Mutex in platforms_alt functions, to be shared
with the trng function, to save RAM. Rename `platform_alt.c`
to `platform_alt.cpp` as the mutex is in a `singletonPtr`
template class.
2019-02-18 11:43:32 +02:00
Cruz Monrreal b820ec8922
Merge pull request #9561 from theotherjimmy/test-resources
Tools changes for bare metal
2019-02-13 12:31:54 -06:00
Alexander Zilberkant 4a204015ac Simplify entropy seed injection configuration
Move NVSEED callbacks configuration to a header file
2019-02-05 15:48:41 +02:00
Alexander Zilberkant 0622cc9865 Add header guard 2019-02-05 15:48:41 +02:00
Alexander Zilberkant 6e87615dc4 Fix compilation warning
Fix warning in entropy.c caused by injecting seed read & write callbacks
2019-02-05 15:48:41 +02:00
Martin Kojtal dcba5ffa3c
Merge pull request #9529 from kfnta/its_crypto
RollUp PR Crypto with ITS
2019-02-04 17:14:05 +01:00
Oren Cohen 156d3b785b Replace psa_prot_internal_storage.h with psa/internal_trusted_storage.h 2019-01-31 17:17:54 +02:00
Jaeden Amero 84ec1f7f1f crypto: Update to Mbed Crypto 1.0.0d2 2019-01-31 17:17:52 +02:00
Kevin Bracey 983503f9ee Mutex-protect mbedtls_hardware_poll
Like all HAL APIs, the calls in trng_api.h are not expected to
be thread-safe.

All current accesses to the TRNG HAL are currently via
`mbedtls_hardware_poll`.  Mbed TLS does not currently serialise these
calls itself, as `MBEDTLS_THREADING_C` is not enabled. But even if
Mbed TLS's own accesses were serialised, there are other direct
users of `mbedtls_hardware_poll` such as randLIB, that need to use
direct calls due to lack of API to extract entropy from Mbed TLS.

As such it makes sense to treat `mbedtls_hardware_poll` as a de facto
public Mbed OS API, akin to the C++ veneers on top of the HAL, and add a
PlatformMutex there so that it is safe for multithreaded use.
2019-01-29 12:45:48 +02:00
Jaeden Amero c3223072dc crypto: Update to Mbed Crypto 1.0.0d1 2019-01-29 11:43:26 +02:00
Jaeden Amero 4a1584696c crypto: importer: Update with fetch
Instead of doing a "pull --rebase" to update to the latest development
branch, do a "fetch" followed by a "checkout" to update to the specified
release. This enables us to get any new tags created since the last
update to the development branch, and removes the noise of updating a
local "development" branch.
2019-01-29 11:43:25 +02:00
Jaeden Amero c74993bac4 crypto: Re-import Mbed Crypto 0.1.0b2
Use the Mbed-Crypto-specific importer script to re-import Mbed Crypto
0.1.0b2 to its new location.
2019-01-29 11:43:24 +02:00
Jaeden Amero b5cf455bb7 tls/crypto: Make mbed-crypto importer independent
Obtain the version of Mbed Crypto to use not from the Mbed TLS
submodule, but independently through the Mbed Crypto importer instead.
2019-01-29 11:43:24 +02:00
Ron Eldor cad40e1633 Rename the platform context varaiable
Rename the generic name `ctx` of `mbedtls_platform_context`
in `platform_alt.c` to a specific name `plat_ctx`, to avoid conflicts
when used as external in crypto modules.
2019-01-22 13:57:32 +02:00
Ron Eldor 4ea68829c5 Rename the platform specific crypto_platform
To avoid collisions between the psa `crypto_platform.h` file and the
platform specific `crypto_platform.h` file, for the init \ terminate
functions, rename the latter to `crypto_device_platform`.
2019-01-22 13:56:59 +02:00
Jimmy Brisson e201fdb6e9 Add placeholder libraries for things we probably refer to as libraries 2019-01-16 14:58:58 -06:00
Simon Butcher 7bf33f01f9 Parameterise repo used in Mbed TLS importer script
This commit makes the repo used to import new Mbed TLS versions into Mbed OS
a parameter, to allow CI scripts (and any other script or users) to specify
specific repos to use for testing.
2019-01-11 13:51:19 +00:00