<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://devzone.nordicsemi.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>nRF5340+nRF7002: Matter-over-WiFi Commissioning failed with our own generated CD, PAA, PAI, DAC and factory data</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/127520/nrf5340-nrf7002-matter-over-wifi-commissioning-failed-with-our-own-generated-cd-paa-pai-dac-and-factory-data</link><description>Hi, We are using NCS v3.0.2 on nRF5340+nRF7002. 
 We have an error when doing matter commissioning using our own generated CD, PAA, PAI, DAC and factory data, see error below: &amp;gt;&amp;gt;pairing ble-wifi 1 myssid mypassword 12345678 3840 --paa-trust-store-path</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 23 Mar 2026 13:05:05 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/127520/nrf5340-nrf7002-matter-over-wifi-commissioning-failed-with-our-own-generated-cd-paa-pai-dac-and-factory-data" /><item><title>RE: nRF5340+nRF7002: Matter-over-WiFi Commissioning failed with our own generated CD, PAA, PAI, DAC and factory data</title><link>https://devzone.nordicsemi.com/thread/563874?ContentTypeID=1</link><pubDate>Mon, 23 Mar 2026 13:05:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0b35396d-63d0-4d4f-833f-94e76d921c90</guid><dc:creator>AHaug</dc:creator><description>&lt;p&gt;Hi, starting with a bullet list with items that might resolve the issue before we dive deeper into the root case. Could you let me know about the results from any of the suggested items below?&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;code dir="ltr"&gt;&lt;/code&gt;&lt;/strong&gt;&lt;/p&gt;
[quote user=""]1. in matter commisioing command, we appended the flag&amp;nbsp;--paa-trust-store-path /var/paa-root-certs/&amp;nbsp;and we&amp;nbsp;copied the&amp;nbsp;PAA certificate to /var/paa-root-certs but from the error logs&amp;nbsp;&amp;quot;&amp;nbsp;Unable to find PAA,&amp;quot; and &amp;quot;CA certificate not found&amp;quot;, what might be the reason why is this?&lt;br /&gt;&lt;br /&gt;note: when using&amp;nbsp;--bypass-attestation-verifier true, the matter commissioning is successful&amp;nbsp;[/quote]
&lt;p&gt;The error message indicates the commissioner cannot find a PAA certificate matching the PAI&amp;#39;s Authority Key Identifier (AKID). Based on the knowledge sources and similar cases, here are the most likely causes:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;The PAA certificate file format in&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;code dir="ltr"&gt;/var/paa-root-certs/&lt;/code&gt;:&lt;/strong&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;The chip-tool&amp;#39;s&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;code dir="ltr"&gt;--paa-trust-store-path&lt;/code&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;flag looks for a PAA certificate that matches the PAI and DAC certificates programmed on the device. See&amp;nbsp;&lt;a href="https://docs.nordicsemi.com/bundle/ncs-latest/page/matter/chip_tool_guide.html#attestation-related_flags" rel="noopener noreferrer" target="_blank"&gt;CHIP Tool guide&lt;/a&gt;.&amp;nbsp;A common issue is that the directory must contain the PAA in the correct format (typically&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;code dir="ltr"&gt;.der&lt;/code&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;or&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;code dir="ltr"&gt;.pem&lt;/code&gt;). Make sure you have copied the PAA certificate (e.g.,&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;code dir="ltr"&gt;Chip-PAA-Cert.der&lt;/code&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;or&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;code dir="ltr"&gt;Chip-PAA-Cert.pem&lt;/code&gt;) to&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;code dir="ltr"&gt;/var/paa-root-certs/&lt;/code&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;—&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;strong&gt;not&lt;/strong&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;the key file.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;CD signed with test key vs. custom PAA:&lt;/strong&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;Looking at your CD generation command, you are signing the CD with the&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;strong&gt;test CD signing key&lt;/strong&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;(&lt;code dir="ltr"&gt;credentials/test/certification-declaration/Chip-Test-CD-Signing-Key.pem&lt;/code&gt;), but your PAA/PAI/DAC chain uses your own custom certificates. The commissioner validates the entire attestation chain: the CD signature, the DAC, the PAI, and the PAA. If the CD is signed with the test key but the PAA is a custom one (not in the built-in trust store), the attestation verifier may fail to reconcile the chain. See&amp;nbsp;&lt;a href="https://docs.nordicsemi.com/bundle/ncs-latest/page/matter/chip_tool_guide.html#attestation-related_flags" rel="noopener noreferrer" target="_blank"&gt;CHIP Tool guide&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Potential fix:&lt;/strong&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;You can also use the&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;code dir="ltr"&gt;--cd-trust-store-path&lt;/code&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;flag to point to the directory containing the public key used to validate your CD signature, and&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;code dir="ltr"&gt;--only-allow-trusted-cd-keys true&lt;/code&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;if you want to enforce only your custom CD key. &lt;span&gt;See&amp;nbsp;&lt;/span&gt;&lt;a href="https://docs.nordicsemi.com/bundle/ncs-latest/page/matter/chip_tool_guide.html#attestation-related_flags" rel="noopener noreferrer" target="_blank"&gt;CHIP Tool guide&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;
&lt;li&gt;A user who resolved a very similar issue noted: &amp;quot;if the certificate is supplied by a third party, the chip-cert tool needs to specify the certificate source using&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;code dir="ltr"&gt;dac-origin-xx-id&lt;/code&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;and declare our own information using&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;code dir="ltr"&gt;xx-id&lt;/code&gt;.&amp;quot; &lt;span&gt;See this&amp;nbsp;&lt;/span&gt;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/123767/matter-commissioning-failure-with-custom-paa-pai-dac-certificates" rel="noopener noreferrer" target="_blank"&gt;DevZone thread&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Also, double-check that the AKID in the PAI certificate correctly matches the Subject Key Identifier (SKID) of the PAA certificate you placed in&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;code dir="ltr"&gt;/var/paa-root-certs/&lt;/code&gt;. The error explicitly references the PAI&amp;#39;s AKID (&lt;code dir="ltr"&gt;60:98:39:11:8F:E4:03:6E:D3:BD:78:46:F3:0C:9B:D6:A9:1E:36:27&lt;/code&gt;), meaning the commissioner is looking for a PAA whose SKID matches this value but cannot find it in the provided directory.&lt;/li&gt;
&lt;/ol&gt;
&lt;hr /&gt;[quote user=""]2. Is the way we write the&amp;nbsp;CD to&amp;nbsp;chip_project_config.h correct? and also&amp;nbsp;how is CD being used in the application? there is not much documentaion related to this and the examples such as matter_weather_station&amp;nbsp;&amp;nbsp;[/quote]
&lt;p&gt;Your approach of converting the CD to a byte array and placing it in&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;code dir="ltr"&gt;chip_project_config.h&lt;/code&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;using&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;code dir="ltr"&gt;CHIP_DEVICE_CONFIG_CERTIFICATION_DECLARATION&lt;/code&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;is the correct method described in the nRF Connect SDK documentation:&amp;nbsp;&lt;em&gt;&amp;quot;In the nRF Connect SDK implementation of Matter, you can configure CD by adding the&amp;nbsp;&lt;code dir="ltr"&gt;CHIP_DEVICE_CONFIG_CERTIFICATION_DECLARATION&lt;/code&gt;&amp;nbsp;define in the&amp;nbsp;&lt;code dir="ltr"&gt;chip_project_config.h&lt;/code&gt;&amp;nbsp;file. You can locate the array of bytes related to CD by running the search with the following condition:&amp;quot;&lt;/em&gt;&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;&lt;code&gt;&lt;span&gt;cat&lt;/span&gt;&lt;span&gt; CD.der &lt;/span&gt;&lt;span&gt;|&lt;/span&gt;&lt;span&gt; xxd -i&lt;/span&gt;&lt;/code&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;See &lt;a href="https://docs.nordicsemi.com/bundle/ncs-latest/page/nrf/protocols/matter/end_product/configuring_cd.html" rel="noopener noreferrer" target="_blank"&gt;Storing CD in firmware&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The CD is included in the attestation information packet sent by the device (commissionee) during the Device Attestation procedure. It is a cryptographic document that confirms the device type was certified, and it contains Vendor ID, Certificate ID, certification type, and other fields. Importantly,&lt;span&gt;&amp;nbsp;&lt;/span&gt;CD is stored in the application firmware (not in factory data), because it must be updated with each new software version/recertification. &lt;span&gt;See&amp;nbsp;&lt;/span&gt;&lt;a href="https://docs.nordicsemi.com/bundle/ncs-latest/page/nrf/protocols/matter/end_product/attestation.html#device_attestation_data_overview" rel="noopener noreferrer" target="_blank"&gt;Device Attestation overview&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;An alternative to embedding it in&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;code dir="ltr"&gt;chip_project_config.h&lt;/code&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;is to store it in Zephyr&amp;#39;s Settings subsystem by enabling&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;code dir="ltr"&gt;CONFIG_CHIP_CERTIFICATION_DECLARATION_STORAGE&lt;/code&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;in&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;code dir="ltr"&gt;prj.conf&lt;/code&gt;, which allows updating the CD after programming. &lt;span&gt;See&amp;nbsp;&lt;/span&gt;&lt;a href="https://docs.nordicsemi.com/bundle/ncs-latest/page/nrf/protocols/matter/end_product/configuring_cd.html" rel="noopener noreferrer" target="_blank"&gt;Storing CD in firmware&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Note:&amp;nbsp;Since you are using the test CD signing key, the commissioner&amp;#39;s built-in test CD public key will be used to validate it. If you intend to use a production CD key, you must provide the corresponding public key via&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;code dir="ltr"&gt;--cd-trust-store-path&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Let me know about these items if they are able to help you resolve the problem your phasing or not and I will get back to you&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;br /&gt;Andreas&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>