Secure storage

This page describes secure storage for persistent Sidewalk keys in Sidewalk products based on nRF Connect SDK. The Sidewalk Platform Abstraction Layer (PAL) uses PSA trusted storage to protect device identity and protocol keys.

Trusted storage is enabled by default with the CONFIG_SIDEWALK_CRYPTO_PSA_KEY_STORAGE Kconfig option. If you are migrating existing products, refer to the Migration guides before changing key storage settings.

Persistent Sidewalk keys

The Sidewalk stack uses two classes of persistent keys:

  • Device identity private keys provisioned through the Sidewalk manufacturing page or generated by the on-device certification flow. These keys correspond to the manufacturing store SID_PAL_MFG_STORE_DEVICE_PRIV_ED25519 and SID_PAL_MFG_STORE_DEVICE_PRIV_P256R1 values.

  • Runtime Sidewalk protocol master keys written by the Sidewalk stack through the PAL key-value storage interface. These symmetric keys derive traffic keys for the network, application, and device-to-device (D2D) layers using the CMAC algorithm.

The following table lists the persistent Sidewalk keys and their usage:

Persistent Sidewalk keys

PSA key ID

Key type

Use

KMU slot usage

SID_CRYPTO_MFG_ED25519_PRIV_KEY_ID

ED25519 private key

Device identity key: proof of possession of the Ed25519 device certificate during registration and certification. Used to sign messages with EdDSA.

Two slots, starting at offset 0.

SID_CRYPTO_MFG_SECP_256R1_PRIV_KEY_ID

secp256r1 private key

Device identity key: proof of possession of the P-256 device certificate during registration and certification. Used to sign messages with ECDSA.

Two slots, starting at offset 2.

SID_CRYPTO_KV_WAN_MASTER_KEY_ID

AES-128 key

Network Primary Key, used to derive network-layer keys for TXID obfuscation, network payload encryption, time synchronization authentication, and join response protection. The key derivation is based on the CMAC algorithm.

One slot at offset 4.

SID_CRYPTO_KV_APP_KEY_KEY_ID

AES-128 key

Application Primary Key, used to derive application-layer keys for Endpoint-to-Application Server payload encryption and application registration. The key derivation is based on the CMAC algorithm.

One slot at offset 5.

SID_CRYPTO_KV_D2D_KEY_ID

AES-128 key

D2D Primary Key, used to derive D2D keys for encrypted communication between the Amazon Sidewalk Mobile SDK and the Endpoint. The key derivation is based on the CMAC algorithm.

One slot at offset 6.

Storage backends

You can configure trusted storage to store keys in one of the following locations:

  • Key Management Unit (KMU) - Enabled by default on supported nRF54L Series platforms with the CONFIG_SIDEWALK_CRYPTO_PSA_KEY_STORAGE_KMU Kconfig option.

  • Settings partition - Used when the KMU option is disabled, for example on platforms without KMU support or when migrating field devices.