Skip to content

[nrf toup][nrfconnect] Handle DAC key in ITS when KMU migration is se… - #767

Open
ArekBalysNordic wants to merge 1 commit into
nrfconnect:masterfrom
ArekBalysNordic:fix_dac_its_org
Open

ArekBalysNordic wants to merge 1 commit into
nrfconnect:masterfrom
ArekBalysNordic:fix_dac_its_org

Conversation

@ArekBalysNordic

Copy link
Copy Markdown
Contributor

Summary

Add CONFIG_CHIP_CRYPTO_PSA_DAC_PRIV_KEY_FATAL_IF_IN_ITS to detect
a DAC private key still stored in PSA ITS when factory data is
configured for CRACEN KMU.

Testing

ncs-matter

…lected

Detect when the DAC private key remains in PSA ITS while factory data
is configured to migrate the key to CRACEN KMU. Abort boot in that
case unless CHIP_CRYPTO_PSA_DAC_PRIV_KEY_KMU_ITS_FALLBACK is enabled;
then sign attestations with the ITS key and log a warning because
ITS-to-KMU migration is not supported.

Extend KMU-related Kconfig dependencies to CRACEN_LIB_KMU.

Signed-off-by: Arkadiusz Balys <arkadiusz.balys@nordicsemi.no>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

Factory reset can permanently erase the only attestation private key on non-TF-M devices using ITS fallback.

1 open issue
What changed in this PR

This PR updates nRF Connect device-attestation key handling when KMU storage is configured but an existing key remains in PSA ITS.

Changes:

  • Adds configurable ITS fallback, enabled by default, with a warning; disabling fallback makes detection fatal.
  • Routes attestation signing through the retained ITS key when fallback is active.
  • Allows KMU configuration with either CRACEN_KMU or CRACEN_LIB_KMU.
File Description
src/​platform/​nrfconnect/​FactoryDataProvider.h Declares fallback detection and state.
src/​platform/​nrfconnect/​FactoryDataProvider.cpp Detects ITS keys and adjusts migration and signing behavior.
config/​nrfconnect/​chip-module/​Kconfig Adds the fallback option and broadens KMU availability.

Review effort: Balanced

Comment thread config/nrfconnect/chip-module/Kconfig

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🔵 Needs a closer look

The previously reported configuration gap still permits factory reset to permanently erase the fallback DAC private key.

No open issues 🎉

1 resolved since last review

Review effort: Balanced

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.

2 participants