-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
18547: sys: PSA Crypto API implementation r=MrKevinWeiss a=Einhornhool ### Contribution description This adds an implementation of the ARM [PSA Crypto API](https://armmbed.github.io/mbed-crypto/html/index.html) specification to RIOT. It is a cryptographic API that supports software and hardware backends as well as the use of multiple secure elements, which can be configured with Kconfig. It integrates indirect, identifier based key management to support persistent storage of key material in local memory and devices with protected key storage. A description of the implementation design and an evaluation of the processing time and memory overhead in RIOT has been published here: [Usable Security for an IoT OS: Integrating the Zoo of Embedded Crypto Components Below a Common API](https://arxiv.org/abs/2208.09281) #### Implementation status So far this implementation supports the following operations: - Volatile key storage - AES in CBC mode - Hashes (MD5, SHA1, SHA224, SHA256) - HMAC SHA256 - ECDSA with NIST P192 and P256 curves The following backends are supported so far: - RIOT Cipher Module - RIOT Hash Module - Micro ECC library package - Cryptocell 310 hardware accelerator on the Nordic NRF52840dk - Microchip ATECC608A secure element Other operations and backends as well as persistent key storage can and will be implemented by me and anyone who wants to contribute in the future. ### Testing procedure So far there is a show case application in `examples/psa_crypto` to demonstrate the usage and configuration of different backends of the API (refer to the application README for more information). Co-authored-by: Lena Boeckmann <lena.boeckmann@haw-hamburg.de>
- Loading branch information
Showing
139 changed files
with
23,955 additions
and
69 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
ifneq (,$(filter periph_ecc_p192r1,$(USEMODULE))) | ||
USEPKG += driver_cryptocell_310 | ||
USEMODULE += psa_cryptocell_310_ecc_p192 | ||
endif | ||
|
||
ifneq (,$(filter periph_ecc_p256r1,$(USEMODULE))) | ||
USEPKG += driver_cryptocell_310 | ||
USEMODULE += psa_cryptocell_310_ecc_p256 | ||
endif | ||
|
||
ifneq (,$(filter periph_hash_sha_1,$(USEMODULE))) | ||
USEPKG += driver_cryptocell_310 | ||
USEMODULE += psa_cryptocell_310_hashes_sha1 | ||
endif | ||
|
||
ifneq (,$(filter periph_hash_sha_224,$(USEMODULE))) | ||
USEPKG += driver_cryptocell_310 | ||
USEMODULE += psa_cryptocell_310_hashes_sha224 | ||
endif | ||
|
||
ifneq (,$(filter periph_hash_sha_256,$(USEMODULE))) | ||
USEPKG += driver_cryptocell_310 | ||
USEMODULE += psa_cryptocell_310_hashes_sha256 | ||
endif | ||
|
||
ifneq (,$(filter periph_hash_sha_512,$(USEMODULE))) | ||
USEPKG += driver_cryptocell_310 | ||
USEMODULE += psa_cryptocell_310_hashes_sha512 | ||
endif | ||
|
||
ifneq (,$(filter periph_cipher_aes_128_cbc,$(USEMODULE))) | ||
USEPKG += driver_cryptocell_310 | ||
USEMODULE += psa_cryptocell_310_aes_cbc | ||
endif | ||
|
||
ifneq (,$(filter periph_hmac_sha_256,$(USEMODULE))) | ||
USEPKG += driver_cryptocell_310 | ||
USEMODULE += psa_cryptocell_310_hmac | ||
endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.