Skip to content

Conversation

mkardous-silabs
Copy link
Contributor

@mkardous-silabs mkardous-silabs commented Sep 25, 2025

Summary

PR cherry-picks all the necessary changes to support PSA keys for the SessionKeyStore which translates to using PSA keys for the Check-In message.
These changes are necessary due to an interop issue with the android chip-tool crypto engine that could not decrypt the check-in message.
PR is a cherry-pick of multiple PRs except the last commit to fix build issues.

Related issues

Note to reviewers: The description in the issue does not clearly describe the problem. The tipping point that caused the issue was a PR to support TrustZone, but the issue was not fixed by TrustZone. The required changes span several PRs.

Fixes #41105

Testing

  1. Built an LongIdleTime ICD
  2. Commissioned the devices using the --icd-registration flag during commissioning
  3. Rebooted the device to validated keys were properly stored and Check-In message could be sucesffuly descryped by the c++ chip-tool and android chip-tool.

Readability checklist

The checklist below will help the reviewer finish PR review in time and keep the
code readable:

  • PR title is
    descriptive
  • Apply the
    “When in Rome…”
    rule (coding style)
  • PR size is short
  • Try to avoid "squashing" and "force-update" in commit history
  • CI time didn't increase

See: Pull Request Guidelines

rcasallas-silabs and others added 10 commits September 24, 2025 13:37
* [Silabs] PSA Crypto PAL customized for EFR32.
Merge in WMN_TOOLS/matter from provision_SPAM to dev/provision_source_code

Squashed commit of the following:

commit ae6d6bd09b963838fa8ae70efefa0770c33c5b73
Author: lpbeliveau-silabs <[email protected]>
Date:   Wed Sep 25 11:08:23 2024 -0400

    Updated the GsdkSpam for series 3 now that provisioning relies on it

commit fb0cb797ca3eea51856e2b62e5b2c0a4dfb8cac3
Author: lpbeliveau-silabs <[email protected]>
Date:   Tue Sep 24 17:53:54 2024 -0400

    Updated provisioning to use Silabs Platform Abstraction Manager

Co-authored-by: Andrei Litvin <[email protected]>
* [Silabs] Provision: Dynamic buffer allocation.

* Code review.
…37580)

* [Silabs] AES_CCM_decrypt output buffer fixed.

* Code review.
* Bump submodule for sdk updates and docker image version

* Update files and libs pulled from sisdk. add -fno-lto ld flag. update mg24 linkerfile

* Bring PSA crypto changes from sisdk

Co-authored-by: Ricardo Casallas <[email protected]>

* fixup merge conflict on CHIPCryptoPALPsaEfr32.cpp

* Update mgm24 linkerfile. add no-lto to test-driver

* update mg26 linkerfile

* Adds mbedTLS 3.x support with tinycrypt uECC APIs (#132)

* [SL-UP] Add BRD4338A support for Wiseconnect 3.4 in GN (#104)

* Update for siwx917

* Changes for wifi sdk 3.4.0 (#89)

* fix slc-gen build

* fix wifi ncp build

* Fixup nxp submodule desync

* Fix ot_lib builds

* Fix linking issue with coapi lib. address comments

* Cleanup commented lines and bump merged matter_support sha

* move some psa define from coap config to the right header

* Add segger_rtt reference in linkerfile

* fix rebase to master conflict issue

---------

Co-authored-by: Ricardo Casallas <[email protected]>
Co-authored-by: Rohan Sahay <[email protected]>
Co-authored-by: Mathieu Kardous <[email protected]>
Co-authored-by: bhmanda-silabs <[email protected]>
@mkardous-silabs mkardous-silabs requested a review from a team as a code owner September 25, 2025 19:42
@mkardous-silabs mkardous-silabs added changing-git-submodules-on-purpose This PR is changing git submodules on intentionally (and it is not a "commit all" typo/mistake) and removed changing-git-submodules-on-purpose This PR is changing git submodules on intentionally (and it is not a "commit all" typo/mistake) labels Sep 25, 2025
Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request cherry-picks a number of changes to support PSA keys for the SessionKeyStore, which is needed to fix an interoperability issue with the Android CHIP tool. The changes are extensive and include:

  • Refactoring the crypto PAL to use standard PSA APIs instead of custom or internal ones, which improves security and maintainability.
  • Introducing a platform abstraction layer for flash operations, cleaning up platform-specific code.
  • Updating build configurations to support a new chip_crypto_keystore option, decoupling the keystore implementation from the crypto library.
  • Updating linker scripts and various SDK dependencies.

The review focuses on the code quality and correctness of the new and refactored code. I've found a couple of issues: a potential memory corruption bug in the Buffer class and a redundant header inclusion. The rest of the changes look solid and are a good improvement to the codebase.

@mkardous-silabs mkardous-silabs added the changing-git-submodules-on-purpose This PR is changing git submodules on intentionally (and it is not a "commit all" typo/mistake) label Sep 25, 2025
@fuxiaoming-lumi
Copy link
Contributor

@mkardous-silabs Our product is developed based on dea605e for LIT ICD, but we have not encountered this issue. This is very strange. I would like to know how to analyze this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changing-git-submodules-on-purpose This PR is changing git submodules on intentionally (and it is not a "commit all" typo/mistake) crypto examples github platform scripts silabs test driver workflows

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Platform] [Silabs][1.4] TrustZone breaks so that check-in message cannot be decoded by controller in v1.4 release branch

6 participants