Storing Certification Declaration in Firmware

A Certification Declaration (CD) is a cryptographic document that allows a Matter device to assert its protocol compliance. During commissioning, the CD is used for device attestation and is included in the AttestationResponse, which is sent from the commissionee to the commissioner. For more information about device attestation and the contents of the CD, please refer to Device Attestation.

Upon successful completion of certification by a device type, Connectivity Standards Alliance creates the CD for that device type so that it can be included in the device firmware by the manufacturer. Thereafter, if the manufacturer undergoes new certification due to software version updates or other reasons, the CSA will issue a new CD, and the manufacturer needs to update the device firmware to replace the existing CD.

The following provides a method for storing the CD in firmware.

  1. Open the file CHIPProjectConfig.h located at the path matter/connectedhomeip/examples/<app_name>/realtek_bee/main/include, where <app_name> refers to the application name, such as lighting-app. In this file, enable the CHIP_USE_DEVICE_CONFIG_CERTIFICATION_DECLARATION configuration.

  2. Convert CD.der into a byte array using the following command.

    $ cat CD.der | xxd -i
    
  3. Open the file matter/connectedhomeip/src/platform/Realtek_bee/CHIPDevicePlatformConfig.h, and replace the contents of the CHIP_DEVICE_CONFIG_CERTIFICATION_DECLARATION macro definition with the generated byte array.