{"id":20713224,"url":"https://github.com/linaro/freertos-pkcs11-psa","last_synced_at":"2025-04-23T08:03:05.032Z","repository":{"id":41066841,"uuid":"268834011","full_name":"Linaro/freertos-pkcs11-psa","owner":"Linaro","description":"FreeRTOS PSA PKCS11","archived":false,"fork":false,"pushed_at":"2024-07-29T09:31:32.000Z","size":109,"stargazers_count":10,"open_issues_count":2,"forks_count":13,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-04-23T08:02:48.605Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Linaro.png","metadata":{"files":{"readme":"ReadMe.md","changelog":null,"contributing":null,"funding":null,"license":"License.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-06-02T15:10:11.000Z","updated_at":"2024-11-02T06:54:46.000Z","dependencies_parsed_at":"2024-07-18T15:09:47.421Z","dependency_job_id":null,"html_url":"https://github.com/Linaro/freertos-pkcs11-psa","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Linaro%2Ffreertos-pkcs11-psa","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Linaro%2Ffreertos-pkcs11-psa/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Linaro%2Ffreertos-pkcs11-psa/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Linaro%2Ffreertos-pkcs11-psa/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Linaro","download_url":"https://codeload.github.com/Linaro/freertos-pkcs11-psa/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250395270,"owners_count":21423399,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-17T02:24:01.295Z","updated_at":"2025-04-23T08:03:05.013Z","avatar_url":"https://github.com/Linaro.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# What is this project\n\nThe Amazon FreeRTOS PKCS#11 to PSA shim layer provides a reference implementation of PKCS#11 API based on PSA API.\n\nPSA is Platform Security Architecture which is initiated by Arm. Please get the details from this [link](https://www.arm.com/why-arm/architecture/platform-security-architecture).\n\nAmazon FreeRTOS uses TLS (Transport Layer Security) to secure the connection between the devices and AWS IoT Cloud.\nPKCS#11 (Public Key Cryptography Standards) provides some security functions to TLS in Amazon FreeRTOS.\nFor example, objective storage and signing.\n\nThe original PKCS#11 API implementation in Amazon FreeRTOS is based on [mbedTLS](https://github.com/ARMmbed/mbedtls).\nThis project is the PSA based PKCS#11 API implementation. This is done by adding the shim layer between these two API sets.\n\nIn general, this shim layer maps the PKCS#11 APIs to PSA Cryptography and Storage APIs V1.0. It follows the same PSA Cryptography API version supported in [mbedtls-3.6.0](https://github.com/ARMmbed/mbedtls/tree/mbedtls-3.6.0). Certificate objects and key objects are protected by PSA secure service. By default, the device private/public keys are persistent while the code verify key is volatile.\n\n# License\n\nPlease check the **License.md** file in this project root folder for the detailed license information.\n\nUnless stated otherwise, the software is provided under the [MIT License](https://spdx.org/licenses/MIT.html).\n\nThis project contains code derived from [mbedTLS](https://github.com/ARMmbed/mbedtls) local copy in [Amazon FreeRTOS project](https://github.com/aws/amazon-freertos). This code, including modifications, is provided under the [Apache-2.0](https://spdx.org/licenses/Apache-2.0.html) license.\n\nFor details:\n- `iot_pkcs11_psa_input_format.h` and `iot_pkcs11_psa_input_format.c` are derivatives of\namazon-freertos\\libraries\\3rdparty\\mbedtls\\library\\pkparse.c (amazon-freertos commit 74875b1d2)\n\n# Integration guide\n\n## Integrate PSA shim layer with the FreeRTOS project\n\nIn Amazon FreeRTOS, this shim layer is cloned into `libraries/abstractions/pkcs11/psa` folder by Git Submodule. To replace the default mbedTLS shim layer with PSA shim layer:\n\n- Add all source files under `libraries/abstractions/pkcs11/psa` to the project (CMakeLists or IDE). Remove the files of other shim layers (for exmaple, the files of mbedTLS shim layer are under `libraries/abstractions/pkcs11/mbedtls`) from the project.\n- Build the PSA implementation as the secure side image (check the Trusted Firmware-M example in the following section).\n- Integrate the FreeRTOS project with the interface files of the PSA implementation (check the TF-M example below).\n- Build the FreeRTOS project.\n- Follow the platform specific instructions to sign/combine the FreeRTOS image and secure side image.\n\n## Integrate FreeRTOS project with Trusted Firmware-M (TF-M)\n\n[TF-M](https://git.trustedfirmware.org/TF-M/trusted-firmware-m.git/) is a PSA implementation. It implements the PSA Firmware Framework API and developer API such as Secure Storage, Cryptography, Initial Attestation, etc. Refer to [PSA website](https://developer.arm.com/architectures/security-architectures/platform-security-architecture) for more details.\n\nThis version of PKCS#11 shim layer is supported by [TF-M v2.1.0](https://git.trustedfirmware.org/TF-M/trusted-firmware-m.git/tag/?h=TF-Mv2.1.0).\n\nPlease follow the [Build instructions](https://tf-m-user-guide.trustedfirmware.org/docs/technical_references/instructions/tfm_build_instruction.html) of TF-M to build the secure side image for your platform.\n\nPlease check [Integration guide](https://github.com/FreeRTOS/FreeRTOS-Kernel/tree/main/portable/ThirdParty/GCC/ARM_CM33_TFM) for integrating FreeRTOS project with TF-M.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flinaro%2Ffreertos-pkcs11-psa","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flinaro%2Ffreertos-pkcs11-psa","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flinaro%2Ffreertos-pkcs11-psa/lists"}