Skip to content

Commit e309246

Browse files
committed
periodic update 03/22/2021 11:11 PDT
1 parent 1bc38e8 commit e309246

39 files changed

+820
-434
lines changed

doc_source/portingguide/afr-porting-pkcs.md

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
# Porting the corePKCS11 library<a name="afr-porting-pkcs"></a>
22

3-
FreeRTOS uses the open standard PKCS \#11 “CryptoKi” API as the abstraction layer for cryptographic operations, including:
4-
+ Signing and verifying\.
5-
+ Storage and enumeration of X\.509 certificates\.
6-
+ Storage and management of cryptographic keys\.
3+
The corePKCS11 library contains a software\-based mock implementation of the PKCS \#11 interface \(API\) that uses the cryptographic functionality provided by Mbed TLS\. Storing private keys in general\-purpose flash memory can be convenient in evaluation and rapid prototyping scenarios\. In production scenarios, to reduce the threats of data theft and device duplication, we recommend that you use dedicated cryptographic hardware\. Cryptographic hardware includes components with features that prevent cryptographic secret keys from being exported\.
74

8-
For more information, see [PKCS \#11 Cryptographic Token Interface Base Specification](http://docs.oasis-open.org/pkcs11/pkcs11-base/v2.40/os/pkcs11-base-v2.40-os.html)\.
5+
To use dedicated cryptographic hardware with FreeRTOS, port the PKCS \#11 API for the hardware you are using\. Generally, vendors for secure cryptoprocessors, such as Trusted Platform Module \(TPM\), Hardware Security Module \(HSM\), Secure Element, or any other type of secure hardware enclave, distribute a PKCS \#11 implementation with the hardware\. You can add the library to CMake and your IDE project, compile it and run the PKCS \#11 test suite\.
96

10-
Storing private keys in general\-purpose flash memory can be convenient in evaluation and rapid prototyping scenarios\. In production scenarios, to reduce the threats of data theft and device duplication, we recommend that you use dedicated cryptographic hardware\. Cryptographic hardware includes components with features that prevent cryptographic secret keys from being exported\. To use dedicated cryptographic hardware with FreeRTOS, you need to port the PKCS \#11 API to the hardware\. For information about the FreeRTOS corePKCS11 library, see [FreeRTOS corePKCS11 Library](https://docs.aws.amazon.com/freertos/latest/userguide/security-pkcs.html) in the *FreeRTOS User Guide*\.
7+
This section describes how to use the FreeRTOS corePKCS11 library as the basis of your own port of the PKCS \#11 API\. Only a subset of the PKCS \#11 standard is implemented, with a focus on operations involving asymmetric keys, random number generation, and hashing\. PKCS \#11 API calls are made by the TLS helper interface in order to perform TLS client authentication during `SOCKETS_Connect`\. PKCS \#11 API calls are also made by our one\-time developer provisioning workflow to import a TLS client certificate and private key for authentication to the AWS IoT MQTT broker\. Those two use cases, provisioning and TLS client authentication, require implementation of only a small subset of the PKCS \#11 interface standard\.
8+
9+
For information about the FreeRTOS corePKCS11 library, see [FreeRTOS corePKCS11 Library](https://docs.aws.amazon.com/freertos/latest/userguide/security-pkcs.html) in the *FreeRTOS User Guide*\.
1110

1211
## Prerequisites<a name="porting-prereqs-pkcs"></a>
1312

@@ -23,19 +22,19 @@ To port the corePKCS11 library, you need the following:
2322

2423
**To port the corePKCS11 library**
2524

26-
1. Port the PKCS \#11 API functions\.
25+
1. Port the PKCS \#11 API functions implemented by corePKCS11\.
2726

2827
The PKCS \#11 API is dependent on the implementation of cryptographic primitives, such as SHA256 hashing and Elliptic Curve Digital Signature Algorithm \(ECDSA\) signing\.
2928

30-
The FreeRTOS implementation of PKCS \#11 uses the cryptographic primitives implemented in the mbedTLS library\. FreeRTOS includes a port for mbedTLS\. If your target hardware offloads crypto to a separate module, or if you want to use a software implementation of the cryptographic primitives other than mbedTLS, you need to modify the existing PKCS \#11 port\.
29+
The FreeRTOS implementation of PKCS \#11 uses the cryptographic primitives implemented in the mbedTLS library\. FreeRTOS includes a port for mbedTLS\. If your target hardware offloads crypto to a separate module, or if you want to use a software implementation of the cryptographic primitives other than mbedTLS, you need to modify the existing PKCS \#11 implementation\.
3130

32-
1. Port the PKCS \# 11 Platform Abstraction Layer \(PAL\) for device\-specific certificate and key storage\.
31+
1. Port the corePKCS11 Platform Abstraction Layer \(PAL\) for device\-specific certificate and key storage\.
3332

3433
If you decide to use the FreeRTOS implementation of PKCS \#11, little customization is required to read and write cryptographic objects to non\-volatile memory \(NVM\), such as onboard flash memory\.
3534

36-
Cryptographic objects should be stored in a section of NVM that is not initialized and is not erased on device reprogramming\. Users of the PKCS \#11 library should be able to provision devices with credentials, and then reprogram the device with a new application that accesses these credentials through the PKCS \#11 interface\.
35+
Cryptographic objects should be stored in a section of NVM that is not initialized and is not erased on device reprogramming\. Users of the corePKCS11 library should be able to provision devices with credentials, and then reprogram the device with a new application that accesses these credentials through the corePKCS11 interface\.
3736

38-
PKCS \#11 PAL ports must provide a location to store:
37+
corePKCS11 PAL ports must provide a location to store:
3938
+ The device client certificate\.
4039
+ The device client private key\.
4140
+ The device client public key\.
@@ -101,7 +100,7 @@ To define a library's portable layer target in `CMakeLists.txt`, follow the inst
101100

102101
The `CMakeLists.txt` template list file under `freertos/vendors/vendor/boards/board/CMakeLists.txt` includes example portable layer target definitions\. You can uncomment the definition for the library that you are porting, and modify it to fit your platform\.
103102

104-
See the following example portable layer target definition for the corePKCS11 library that uses the mbedTLS\-based software implementation of PKCS \#11 and supplies a port\-specific PKCS \#11 PAL file\.
103+
See the following example portable layer target definition for the corePKCS11 library that uses the mbedTLS\-based software implementation of PKCS \#11 and supplies a port\-specific corePKCS11 PAL file\.
105104

106105
```
107106
# PKCS11
@@ -139,6 +138,6 @@ After you set up the library in the IDE project, you need to configure some othe
139138

140139
## Validation<a name="pkcs-validation"></a>
141140

142-
To officially qualify a device for FreeRTOS, you need to validate the device's ported source code with AWS IoT Device Tester\. Follow the instructions in [ Using AWS IoT Device Tester for FreeRTOS](https://docs.aws.amazon.com/freertos/latest/userguide/device-tester-for-freertos-ug.html) in the FreeRTOS User Guide to set up Device Tester for port validation\. To test a specific library's port, the correct test group must be enabled in the `device.json` file in the Device Tester `configs` folder\.
141+
To officially qualify a device for FreeRTOS, you need to validate the device's ported source code with AWS IoT Device Tester\. Follow the instructions in [Using AWS IoT Device Tester for FreeRTOS](https://docs.aws.amazon.com/freertos/latest/userguide/device-tester-for-freertos-ug.html) in the FreeRTOS User Guide to set up Device Tester for port validation\. To test a specific library's port, the correct test group must be enabled in the `device.json` file in the Device Tester `configs` folder\.
143142

144143
After you finish porting the corePKCS11 library to your device, you can start porting the TLS library\. See [Porting the TLS library](afr-porting-tls.md) for instructions\.

doc_source/portingguide/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# FreeRTOS Porting Guide
22

33
-----
4-
*****Copyright &copy; 2021 Amazon Web Services, Inc. and/or its affiliates. All rights reserved.*****
4+
*****Copyright &copy; Amazon Web Services, Inc. and/or its affiliates. All rights reserved.*****
55

66
-----
77
Amazon's trademarks and trade dress may not be used in

doc_source/qualificationguide/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# FreeRTOS Qualification Guide
22

33
-----
4-
*****Copyright &copy; 2021 Amazon Web Services, Inc. and/or its affiliates. All rights reserved.*****
4+
*****Copyright &copy; Amazon Web Services, Inc. and/or its affiliates. All rights reserved.*****
55

66
-----
77
Amazon's trademarks and trade dress may not be used in

doc_source/userguide/afr-bridgekeeper-dt-bt.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ To test the BLE capabilities of the device under test \(DUT\), you must have a R
1616
**To set up your Raspberry Pi to run BLE tests**
1717

1818
1. Download the custom [Yocto image](https://docs.aws.amazon.com/freertos/latest/userguide/afr/IDT_AFR_BLE_RaspberryPi_1.0.0.rpi-sdimg) that contains the software required to perform the tests\.
19+
**Note**
20+
The Yocto image should only be used for testing with AWS IoT Device Tester for FreeRTOS and not for any other purpose\.
1921

2022
1. Flash the yocto image onto the SD card for Raspberry Pi\.
2123

doc_source/userguide/afr-device-defender-library.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,12 @@ You can use the AWS IoT Device Defender library to send security metrics from yo
88

99
The library is written in C and designed to be compliant with [ISO C90](https://en.wikipedia.org/wiki/ANSI_C#C90) and [MISRA C:2012](https://www.misra.org.uk/MISRAHome/MISRAC2012/tabid/196/Default.aspx)\. The library has no dependencies on any additional libraries other than the standard C library\. It also doesn’t have any platform dependencies, such as threading or synchronization\. It can be used with any MQTT library and any [JSON](https://freertos.org/json/json-terminology.html) or [CBOR](https://cbor.io/) library\. The library has [proofs](https://www.cprover.org/cbmc/) showing safe memory use and no heap allocation, making it suitable for IoT microcontrollers, but also fully portable to other platforms\.
1010

11-
The AWS IoT Device Defender library can be freely used and is distributed under the [MIT open source license](https://freertos.org/a00114.html)\.
11+
The AWS IoT Device Defender library can be freely used and is distributed under the [MIT open source license](https://freertos.org/a00114.html)\.
12+
13+
14+
****
15+
16+
| Code Size of AWS IoT Device Defender \(example generated with GCC for ARM Cortex\-M\) | File | With \-O1 Optimisation | With \-Os Optimisation |
17+
| --- | --- | --- | --- |
18+
| defender\.c | 1\.1K | 0\.6K |
19+
| Total estimate | 1\.1K | 0\.6K |

doc_source/userguide/backoffalgorithm-library.md

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,10 @@ The library is written in C and designed to be compliant with [ISO C90](https://
1010

1111
This library can be freely used and is distributed under the [MIT open source license](https://freertos.org/a00114.html)\.
1212

13-
```
14-
-----------------------------------------------------------------------
15-
| Code Size of backoffAlgorithm |
16-
| (example generated with [GCC for ARM Cortex\-M](https://developer.arm.com/tools-and-software/open-source-software/developer-tools/gnu-toolchain/gnu-rm/downloads/9-2019-q4-major)) |
17-
|---------------------------------------------------------------------|
18-
| File | With -O1 Optimisation | With -Os Optimisation |
19-
|---------------------|-----------------------|-----------------------|
20-
| backoff_algorithm.c | 0.1K | 0.1K |
21-
|---------------------|-----------------------|-----------------------|
22-
| Total estimate | 0.1K | 0.1K |
23-
-----------------------------------------------------------------------
24-
```
13+
14+
****
15+
16+
| Code Size of backoffAlgorithm \(example generated with GCC for ARM Cortex\-M\) | File | With \-O1 Optimisation | With \-Os Optimisation |
17+
| --- | --- | --- | --- |
18+
| backoff\_algorithm\.c | 0\.1K | 0\.1K |
19+
| Total estimate | 0\.1K | 0\.1K |

doc_source/userguide/core-http-demo.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# coreHTTP demos<a name="core-http-demo"></a>
22

3+
These demos can help you learn how to use the coreHTTP library\.
4+
35
**Topics**
46
+ [coreHTTP mutual authentication demo](core-http-ma-demo.md)
57
+ [coreHTTP basic Amazon S3 upload demo](core-http-s3-upload-demo.md)

doc_source/userguide/core-http.md

Lines changed: 8 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -14,18 +14,11 @@ When using HTTP connections in IoT applications, we recommend that you use a sec
1414

1515
This library can be freely used and is distributed under the [MIT open source license](https://freertos.org/a00114.html)\.
1616

17-
```
18-
---------------------------------------------------------------------------
19-
| Code Size of coreHTTP |
20-
| (example generated with [GCC for ARM Cortex\-M](https://developer.arm.com/tools-and-software/open-source-software/developer-tools/gnu-toolchain/gnu-rm/downloads/9-2019-q4-major)) |
21-
|-------------------------------------------------------------------------|
22-
| File | With -O1 Optimisation | With -Os Optimisation |
23-
|-------------------------|-----------------------|-----------------------|
24-
| core-http_client.c | 3.0K | 2.4K |
25-
|-------------------------|-----------------------|-----------------------|
26-
| http_parser.c | 15.7K | 13.0K |
27-
| (third-party utility) | | |
28-
|-------------------------|-----------------------|-----------------------|
29-
| Total estimate | 18.7K | 15.4K |
30-
---------------------------------------------------------------------------
31-
```
17+
18+
****
19+
20+
| Code Size of coreHTTP \(example generated with GCC for ARM Cortex\-M\) | File | With \-O1 Optimisation | With \-Os Optimisation |
21+
| --- | --- | --- | --- |
22+
| core\_http\_client\.c | 3\.1K | 2\.5K |
23+
| http\_parser\.c \(third\-party utility\) | 15\.7K | 13\.0K |
24+
| Total estimate | 18\.8K | 15\.5K |

doc_source/userguide/coremqtt.md

Lines changed: 9 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -21,19 +21,12 @@ When using MQTT connections in IoT applications, we recommended that you use a s
2121

2222
This MQTT library doesn't have platform dependencies, such as threading or synchronization\. This library does have [proofs](https://www.cprover.org/cbmc/) that demonstrate safe memory use and no heap allocation, which makes it suitable for IoT microcontrollers, but also fully portable to other platforms\. It can be freely used, and is distributed under the [MIT open source license](https://freertos.org/a00114.html)\.
2323

24-
```
25-
---------------------------------------------------------------------------
26-
| Code Size of coreMQTT |
27-
| (example generated with [GCC for ARM Cortex\-M](https://developer.arm.com/tools-and-software/open-source-software/developer-tools/gnu-toolchain/gnu-rm/downloads/9-2019-q4-major)) |
28-
|-------------------------------------------------------------------------|
29-
| File | With -O1 Optimisation | With -Os Optimisation |
30-
|-------------------------|-----------------------|-----------------------|
31-
| core_mqtt.c | 3.0K | 2.6K |
32-
|-------------------------|-----------------------|-----------------------|
33-
| core_mqtt_state.c | 1.4K | 1.1K |
34-
|-------------------------|-----------------------|-----------------------|
35-
| core_mqtt_serializer.c | 2.5K | 2.0K |
36-
|-------------------------|-----------------------|-----------------------|
37-
| Total estimate | 6.9K | 5.7K |
38-
---------------------------------------------------------------------------
39-
```
24+
25+
****
26+
27+
| Code Size of coreMQTT \(example generated with GCC for ARM Cortex\-M\) | File | With \-O1 Optimisation | With \-Os Optimisation |
28+
| --- | --- | --- | --- |
29+
| core\_mqtt\.c | 3\.0K | 2\.6K |
30+
| core\_mqtt\_state\.c | 1\.4K | 1\.1K |
31+
| core\_mqtt\_serializer\.c | 2\.5K | 2\.0K |
32+
| Total estimate | 6\.9K | 5\.7K |

doc_source/userguide/create-ota-user-policy.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ To grant your IAM user the required permissions, create an OTA user policy and t
4141
"s3:PutBucketVersioning",
4242
"s3:GetBucketLocation",
4343
"s3:GetObjectVersion",
44+
"s3:ListBucketVersions",
4445
"acm:ImportCertificate",
4546
"acm:ListCertificates",
4647
"iot:*",

doc_source/userguide/dev-tester-prereqs.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ where <FREERTOS\_RELEASE\_VERSION> is a version of FreeRTOS \(for example, 20200
1717
Windows has a path length limitation of 260 characters\. The path structure of FreeRTOS is many levels deep, so if you are using Windows, keep your file paths under the 260\-character limit\. For example, clone FreeRTOS to `C:\FreeRTOS` rather than `C:\Users\username\programs\projects\myproj\FreeRTOS\`\.
1818

1919
## LTS Qualification \(Qualification for FreeRTOS that uses LTS libraries\)<a name="lts-qualification-dev-tester-afr"></a>
20-
+ In order for your microcontroller to be designated as supporting the long\-term support \(LTS\) version of FreeRTOS in the AWS Partner Device Catalog, you must provide a manifest file\. For more information, see the [ FreeRTOS Qualification Checklist](https://docs.aws.amazon.com/freertos/latest/qualificationguide/afq-checklist.html) in the *FreeRTOS Qualification Guide*\.
21-
+ In order to validate that your microcontroller supports the LTS version of FreeRTOS and qualify it for submission to the AWS Partner Device Catalog, you must use AWS IoT Device Tester \(IDT\) for FreeRTOS v4\.0\.0\.
22-
+ At this time, support for LTS based versions of FreeRTOS is limited to the 202012\.00 version of FreeRTOS\.
20+
+ In order for your microcontroller to be designated as supporting long\-term support \(LTS\) based versions of FreeRTOS in the AWS Partner Device Catalog, you must provide a manifest file\. For more information, see the [ FreeRTOS Qualification Checklist](https://docs.aws.amazon.com/freertos/latest/qualificationguide/afq-checklist.html) in the *FreeRTOS Qualification Guide*\.
21+
+ At this time, in order to validate that your microcontroller supports LTS based versions of FreeRTOS and qualify it for submission to the AWS Partner Device Catalog, you must use AWS IoT Device Tester \(IDT\) with FreeRTOS Qualification \(FRQ\) test suite version v1\.4\.x\.
22+
+ At this time, support for LTS based versions of FreeRTOS is limited to the 202012\.xx version of FreeRTOS\.
2323

2424
## Download IDT for FreeRTOS<a name="download-dev-tester-afr"></a>
2525

0 commit comments

Comments
 (0)