Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch to PSA crypto #311

Merged
merged 1 commit into from
Dec 21, 2023

Conversation

ArekBalysNordic
Copy link
Contributor

@ArekBalysNordic ArekBalysNordic commented Jul 31, 2023

Draft PR with PSA Crypto enabled within Matter and OpenThread.

  • Selected OpenThread security PSA Crypto background
  • Switched to PSAOperationalKeystore when CHIP_CRYPTO_PSA is enabled
  • Changed definitions from CONFIG_NORDIC_SECURITY_BACKEND to
    CONFIG_NRF_SECURITY to avoid using MBEDTLS Legacy.

WARNING: PSA Crypto is selected to y by default!

config/nrfconnect/chip-module/Kconfig.defaults Outdated Show resolved Hide resolved
src/app/server/Server.h Outdated Show resolved Hide resolved
Copy link
Contributor

@Damian-Nordic Damian-Nordic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have you maybe checked what is the flash increase after switching to PSA in the current form?

config/nrfconnect/chip-module/Kconfig.defaults Outdated Show resolved Hide resolved
config/nrfconnect/chip-module/Kconfig.defaults Outdated Show resolved Hide resolved
@ArekBalysNordic
Copy link
Contributor Author

Have you maybe checked what is the flash increase after switching to PSA in the current form?

@Damian-Nordic
With Joiner disabled and PSA Crypto enabled we have 20 kB less Flash occupancy in comparison to MbedTLS Legacy. But for now, RAM usage increased ~14 kB - This is to be verified regarding MbedTLS HEAP size.

src/platform/Zephyr/PlatformManagerImpl.cpp Outdated Show resolved Hide resolved
src/platform/nrfconnect/CHIPPlatformConfig.h Outdated Show resolved Hide resolved
config/nrfconnect/chip-module/CMakeLists.txt Outdated Show resolved Hide resolved
config/nrfconnect/chip-module/Kconfig.defaults Outdated Show resolved Hide resolved
config/nrfconnect/chip-module/Kconfig.defaults Outdated Show resolved Hide resolved
@ArekBalysNordic ArekBalysNordic force-pushed the switch_to_psa branch 2 times, most recently from b7fc181 to 38ecf7e Compare December 4, 2023 10:44
config/nrfconnect/chip-module/Kconfig.defaults Outdated Show resolved Hide resolved
config/zephyr/Kconfig Outdated Show resolved Hide resolved
@ArekBalysNordic
Copy link
Contributor Author

@kkasperczyk-no @Damian-Nordic I've removed the experimental from the CHIP_CRYPTO_PSA kconfig. Please look at the newest version of the commit once again.

- PSA Crypto API can be disabled by setting
the CONFIG_CHIP_CRYPTO_PSA config to "n".

- Selected OpenThread security PSA Crypto background

- Enabled required PSA_WANT configs

- Extended maximum PSA key slots to fit Matter requirements.
@ArekBalysNordic ArekBalysNordic merged commit f185cba into nrfconnect:master Dec 21, 2023
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants