1- # IoT Reference Integration for Corstone-3xx
1+ # IoT Reference Integration for Arm Corstone-3xx
22
33## Introduction
44
55This reference integration demonstrates how to develop cloud connected
66applications and update them securely by integrating modular
77[ FreeRTOS kernel] ( https://www.freertos.org/RTOS.html ) and [ libraries] ( https://www.freertos.org/libraries/categories.html )
88and utilizing hardware enforced security based on [ Arm TrustZone (Armv8-M)] ( https://www.arm.com/architecture/learn-the-architecture/m-profile ) .
9+
10+ To utilize the hardware enforced security, this integration uses PSA Certified
11+ reference implementation [ Trusted Firmware-M] ( https://www.trustedfirmware.org/projects/tf-m/ ) .
12+ Trusted Firmware-M provides various Secure services such as Secure boot, Crypto, Secure Storage,
13+ Attestation and Update services meeting [ PSA Certified requirements] ( https://www.psacertified.org/blog/psa-certified-10-security-goals-explained/ ) .
914This project is based on the [ Corstone-300] ( https://developer.arm.com/Processors/Corstone-300 )
1015platform.
1116
12- ## Arm TrustZone (Armv8-M)
17+ Developers and partners can use this integration as a starting point to build
18+ FreeRTOS kernel and libraires based software stack on top of Arm Cortex-M based
19+ platforms. All the components are put together in a modular manner to make
20+ porting of this integration across platforms easy.
21+
22+ ## Examples
1323
14- TrustZone technology for Armv8-M is an optional Security Extension that is
15- designed to provide a foundation for improved system security in a wide range
16- of embedded applications. Follow the [ link] ( https://developer.arm.com/documentation/100690/0201/Arm-TrustZone-technology )
17- for more information on TrustZone technology for Armv8-M.
24+ This reference integration contains following two examples:
1825
19- ## Trusted Firmware M
26+ * [ Blinky example] ( Docs/blinky.md )
27+ * Demonstrates FreeRTOS kernel and TF-M integration
28+ * [ AWS IoT example] ( Docs/aws-iot-example.md )
29+ * Demonstrates [ secure connectivity] ( #secure-tls-connection ) to AWS IoT core using [ Mbed TLS] ( #mbed-tls ) ,
30+ [ PKCS #11 PSA Shim] ( #pkcs11-psa-shim ) and [ coreMQTT-agent] ( https://docs.aws.amazon.com/freertos/latest/userguide/coremqtt-agent.html )
31+ library. In addition, [ secure OTA] ( #secure-ota-updates ) using [ OTA agent] ( https://freertos.org/ota/index.html )
32+ and [ AWS OTA PAL PSA implementation] ( #aws-ota-pal-psa-implementation ) .
33+
34+ ### Secure TLS Connection
35+
36+ Corstone platform communicates with the AWS IoT Core over a secure TLS
37+ connection. Mbed TLS running on the NSPE is used to establish the TLS
38+ connection. Mbed TLS makes use of the PSA Crypto APIs provided by TF-M for
39+ Crypto operations.
40+
41+ [ PKCS #11 ] ( https://www.freertos.org/pkcs11/index.html ) APIs to perform TLS
42+ client authentication and import TLS client certificate and private key into
43+ the device. PKCS #11 has been integrated with TF-M using a thin shim. In the
44+ integration, the PKCS #11 APIs invoke the appropriate PSA Secure Storage API or
45+ Cryptographic API via the shim. This ensures the keys and certificates are
46+ protected and the cryptographic operations are performed securely within the
47+ SPE of TF-M and is isolated from the kernel, libraries and applications in the
48+ Non-secure Processing Environment. Keys and certificates are securely stored.
49+ This is enabled by TF-M’s Internal Trusted Storage (ITS) and Protected Storage
50+ (PS) services. Signing during TLS client authentication is performed by TF-M’s
51+ Crypto service.
52+
53+ ### Secure OTA Updates
54+
55+ FreeRTOS OTA Agent provides an OTA PAL layer for platforms to integrate and
56+ enable OTA updates. The demo integrates and OTA PAL implementation that makes
57+ use of the PSA Certified Firmware Update API implemented in TF-M. This allows
58+ Corstone-300 to receive new images from AWS IoT Core, authenticate using TF-M
59+ before deploying the image as the active image. The secure (TF-M) and the
60+ non-secure (FreeRTOS kernel and the application) images can be updated
61+ separately.
62+
63+ Every time the device boots, MCUBoot (bootloader) verifies that the image
64+ signature is valid before booting the image. Since the secure (TF-M) and the
65+ non-secure (FreeRTOS kernel and the application) images are singed separately,
66+ MCUBoot verifies that both image signatures are valid before booting. If either
67+ of the verification fails, then MCUBoot stops the booting process.
68+
69+ ## Software Components
70+
71+ ### Trusted Firmware M
2072
2173Trusted Firmware-M (TF-M) implements the Secure Processing Environment (SPE)
2274for Armv8-M, Armv8.1-M architectures (e.g. the Cortex-M33, Cortex-M23,
@@ -26,10 +78,20 @@ guidelines, enabling chips, Real Time Operating Systems and devices to become
2678PSA Certified. Follow the [ link] ( https://tf-m-user-guide.trustedfirmware.org/introduction/readme.html )
2779for more information on Trusted Firmware M.
2880
29- ## PKCS #11 PSA Shim
81+ ### Mbed TLS
82+
83+ Project implements cryptographic primitives, X.509 certificate manipulation and
84+ the SSL/TLS and DTLS protocols. The project provides reference implementation
85+ of [ PSA Cryptography API Specification] ( https://developer.arm.com/documentation/ihi0086/b )
86+ by supporting the cryptographic operations via. PSA Crypto APIs. Follow the
87+ [ link] ( https://www.trustedfirmware.org/projects/mbed-tls/ ) for more information
88+ on Mbed TLS.
89+
90+ ### PKCS11 PSA Shim
3091
31- PKCS #11 PSA shim layer provides a reference implementation of PKCS #11 API based
32- on [ Platform Security Architecture] ( https://www.arm.com/architecture/psa-certified )
92+ [ PKCS #11 PSA shim layer] ( https://github.com/Linaro/freertos-pkcs11-psa.git )
93+ provides a reference implementation of PKCS #11 API based on
94+ [ Platform Security Architecture] ( https://www.arm.com/architecture/psa-certified )
3395API.
3496
3597This shim layer maps the PKCS #11 APIs to PSA Cryptography and Storage APIs
@@ -39,22 +101,16 @@ Certificate objects and key objects are protected by PSA secure service.
39101By default, the device private/public keys are persistent while the code verify
40102key is volatile.
41103
42- ## AWS OTA PAL PSA implementation
104+ ### AWS OTA PAL PSA implementation
43105
44- Implementation of AWS OTA PAL based on [ Platform Security Architecture] ( https://www.arm.com/architecture/psa-certified )
106+ Implementation of [ AWS OTA PAL] ( https://github.com/Linaro/freertos-ota-pal-psa.git )
107+ based on [ Platform Security Architecture] ( https://www.arm.com/architecture/psa-certified )
45108API.
46109
47110This implementation maps the AWS OTA PAL APIs to the PSA Firmware Update and
48111PSA Cryptography APIs. The writing, verification and activation of the update
49112image are protected by the PSA secure services.
50113
51- ## Examples
52-
53- This reference integration contains following two examples:
54-
55- * [ Blinky example] ( Docs/blinky.md )
56- * [ AWS IoT example] ( Docs/aws-iot-example.md )
57-
58114## Contributing
59115
60116See [ CONTRIBUTING] ( CONTRIBUTING.md ) for more information.
0 commit comments