OperationalCredentials Cluster
Cluster ID: 0x003E |
Endpoint: Fixed on Endpoint 0 (Root Endpoint)
OperationalCredentials is the cornerstone of Matter device secure communication — responsible for managing device Node Operational Certificates (NOC) and Fabric credentials. Every Matter device that joins a Fabric (home network) needs to complete certificate issuance and installation through this Cluster. It is also the core of multi-admin scenarios — a single device can join multiple Fabrics simultaneously, with each Fabric independently managing its own NOC.
Fabric: A logical "home network" defined by a certificate system issued by the same Root CA. Devices within the same Fabric can communicate with each other.
NOC (Node Operational Certificate): A device's "identity card" within a Fabric, containing the device's NodeID and FabricID, issued by the Commissioner's (phone App) Root CA.
ICAC: Intermediate CA certificate, optional. Adds an extra layer to the trust chain between Root CA and NOC.
DAC (Device Attestation Certificate): A certificate pre-installed at factory, proving "this is a legitimate Matter device." Used for device attestation during commissioning.
CSR: Certificate Signing Request. After the device generates a key pair, it packages the public key as a CSR and sends it to the Commissioner, who uses their own CA to issue the NOC.
Commands
The OperationalCredentials Cluster has 8 commands covering the complete flow of device attestation, CSR generation, NOC installation, and Fabric management. Most commands are automatically called by the Commissioner during commissioning; App developers typically do not need to send them manually. However, understanding these commands is crucial for debugging commissioning failures and implementing multi-admin. Click a command ID in the table below to jump to its detailed description.
| ID | Name | Direction | Description |
|---|---|---|---|
0x00 |
AttestationRequest | C → S | Request device attestation (DAC signature) |
0x01 |
AttestationResponse | S → C | Return device attestation data |
0x02 |
CertificateChainRequest | C → S | Request DAC or PAI certificate |
0x03 |
CertificateChainResponse | S → C | Return the requested certificate |
0x04 |
CSRRequest | C → S | Request CSR generation (Certificate Signing Request) |
0x05 |
CSRResponse | S → C | Return CSR data |
0x06 |
AddNOC | C → S | Install NOC, join new Fabric |
0x07 |
UpdateNOC | C → S | Update current Fabric's NOC |
0x09 |
UpdateFabricLabel | C → S | Modify Fabric label |
0x0A |
RemoveFabric | C → S | Remove Fabric (including NOC and trust root) |
0x0B |
AddTrustedRootCertificate | C → S | Add trusted Root CA certificate |
C → S: Request commands from Commissioner (phone App) to device.
S → C: Response commands from device to Commissioner.
Response commands (AttestationResponse, CertificateChainResponse, CSRResponse) do not need to be sent manually; they are automatic replies from the device upon receiving a request.
Replies to AddNOC / UpdateNOC / UpdateFabricLabel / RemoveFabric are uniformly NOCResponse (containing StatusCode and FabricIndex).
AttestationRequest — Device Attestation Request(0x00)
The first step of commissioning: verify whether the device is a legitimate Matter device. The Commissioner sends a random number (Nonce), and the device signs the Nonce and device information with the DAC (Device Attestation Certificate) private key to prove it holds a legitimate DAC.
| Parameter | Type | Description |
|---|---|---|
| AttestationNonce | octstr (32 bytes) | 32-byte random number to prevent replay attacks |
Usage Scenarios
Automatically executed during commissioning. After the Commissioner establishes a PASE connection via BLE or IP, it first sends AttestationRequest. If the device's DAC signature verification fails, the commissioning flow terminates immediately and reports device attestation failure.
AttestationResponse — Device Attestation Response(0x01)
Automatic reply after the device receives AttestationRequest. Contains device attestation information and DAC signature. The Commissioner verifies the signature upon receipt, checks the DAC certificate chain (DAC → PAI → PAA), and confirms device legitimacy.
| Parameter | Type | Description |
|---|---|---|
| AttestationElements | octstr | TLV-encoded attestation information (including Certification Declaration, Nonce, Timestamp, etc.) |
| AttestationSignature | octstr (64 bytes) | ECDSA-P256 signature of AttestationElements by the DAC private key |
CertificateChainRequest — Certificate Chain Request(0x02)
Request the device to return the DAC (Device Attestation Certificate) or PAI (Product Attestation Intermediate Certificate). The Commissioner needs the complete certificate chain to verify the device attestation signature — DAC is issued by PAI, PAI is issued by PAA.
| Parameter | Type | Description |
|---|---|---|
| CertificateType | CertificateChainTypeEnum | 1 = DAC certificate, 2 = PAI certificate (see enum definition) |
Usage Scenarios
During commissioning, the Commissioner typically first requests the DAC (type=1), then the PAI (type=2), and then combines them with the locally or cloud-stored PAA (Product Attestation Authority) root certificate to complete the full trust chain verification.
CertificateChainResponse — Certificate Chain Response(0x03)
The device returns the requested certificate. Certificate format is DER-encoded X.509 v3.
| Parameter | Type | Description |
|---|---|---|
| Certificate | octstr | DER-encoded X.509 certificate (DAC or PAI) |
CSRRequest — CSR Generation Request(0x04)
Instructs the device to generate a new Operational Key Pair and return a CSR (Certificate Signing Request) containing the public key. After receiving the CSR, the Commissioner uses its own Root CA to issue the NOC certificate, then writes it to the device via AddNOC.
| Parameter | Type | Description |
|---|---|---|
| CSRNonce | octstr (32 bytes) | 32-byte random number, bound to the CSR to prevent replay |
| IsForUpdateNOC | bool | Optional. When true, indicates this CSR is for updating an existing NOC (not first-time installation) |
Usage Scenarios
Executed in the commissioning flow after device attestation passes. The CSR contains the device's newly generated public key; the Commissioner uses its own CA to issue the NOC for this public key. The device retains the corresponding private key, which is used to prove identity when establishing subsequent CASE sessions.
CSRResponse — CSR Response(0x05)
The device returns CSR data and DAC signature. The Commissioner verifies the signature and extracts the CSR for issuing the NOC.
| Parameter | Type | Description |
|---|---|---|
| NOCSRElements | octstr | TLV-encoded NOCSR structure (containing PKCS#10 CSR and CSRNonce) |
| AttestationSignature | octstr (64 bytes) | ECDSA-P256 signature of NOCSRElements by the DAC private key |
AddNOC — Install NOC(0x06)
A critical step in the commissioning flow: write the Commissioner-issued NOC certificate to the device, officially adding the device to a new Fabric. This is the command with the most parameters in the entire certificate installation flow. Upon successful execution, the device receives a new FabricIndex.
| Parameter | Type | Required | Description |
|---|---|---|---|
| NOCValue | octstr | Yes | Issued NOC certificate (Matter Operational Certificate, DER-encoded) |
| ICACValue | octstr | Optional | Intermediate CA certificate. Not required if NOC is directly issued by Root CA |
| IPKValue | octstr (16 bytes) | Yes | Identity Protection Key, used for group communication encryption within the Fabric |
| CaseAdminSubject | uint64 | Yes | CASE administrator's Subject (typically the Commissioner's NodeID). This node has administrative privileges on this Fabric |
| AdminVendorId | uint16 | Yes | Administrator's Vendor ID (identifies which manufacturer's App initiated commissioning) |
After AddNOC executes, the device returns NOCResponse, containing:
StatusCode (see NodeOperationalCertStatusEnum) and
FabricIndex (newly assigned index, only has a value on success).
Usage Scenarios
This is the final step of commissioning. The flow is: AddTrustedRootCertificate → CSRRequest → issue NOC with CA → AddNOC. After successful execution, the device establishes a new CASE session, and subsequent communication switches from PASE to CASE (certificate-based secure channel).
UpdateNOC — Update NOC(0x07)
Updates the current Fabric's NOC certificate. Typically used when the certificate is about to expire or key rotation is needed. Can only update the NOC of the Fabric that issued this command; cross-Fabric operations are not allowed.
| Parameter | Type | Required | Description |
|---|---|---|---|
| NOCValue | octstr | Yes | New NOC certificate (DER-encoded) |
| ICACValue | octstr | Optional | New intermediate CA certificate |
Usage Scenarios
Certificate rotation scenario: Commissioner first calls CSRRequest (IsForUpdateNOC=true) to get a new CSR, issues a new NOC with the CA, then calls UpdateNOC to write it. The old NOC is replaced, FabricIndex remains unchanged.
UpdateFabricLabel — Update Fabric Label(0x09)
Modify the current Fabric's user-defined label (e.g., "Home", "Office"). Purely for display purposes, does not affect security or communication. Can only modify the label of the Fabric that issued the command.
| Parameter | Type | Description |
|---|---|---|
| Label | string (max 32) | New label. Empty string clears the label. Must not duplicate labels of other Fabrics on the same device |
Usage Scenarios
Users name a Fabric in the App, such as labeling it "Home" or "Office," for easy identification in multi-admin scenarios. If the provided Label matches an existing Fabric label on the device, the device returns a LabelConflict error.
RemoveFabric — Remove Fabric(0x0A)
Removes the specified Fabric from the device. Deletes the Fabric's corresponding NOC, ICAC, trusted root certificate, ACL entries, and all associated data. Can remove any Fabric (including other administrators'), making this a high-privilege operation.
| Parameter | Type | Description |
|---|---|---|
| FabricIndex | uint8 | Fabric index to remove (obtained from the Fabrics attribute list) |
If the device has only joined one Fabric, executing RemoveFabric will return the device to an uncommissioned state (equivalent to factory reset). If the removed Fabric is the one you are on, the current CASE session will disconnect immediately.
Usage Scenarios
"Unpair" operation: When a user removes a device in the App, the App calls RemoveFabric to remove its own Fabric. If the device is also commissioned on other platforms (e.g., Google Home / Apple Home), those Fabrics are not affected. Extreme scenario: If the App loses connection to the device, a physical button factory reset can clear all Fabrics.
AddTrustedRootCertificate — Add Trusted Root Certificate(0x0B)
Writes a Root CA certificate to the device. This is a prerequisite step for AddNOC — the device needs to know which Root CA to trust before it can accept NOCs issued by that CA. Each Fabric corresponds to one trust root.
| Parameter | Type | Description |
|---|---|---|
| RootCACertificate | octstr | Root CA certificate (Matter Operational Certificate format, DER-encoded) |
This command can only be executed in a PASE session (i.e., the device has not completed commissioning, using a temporary secure channel established with a Passcode), or within a Fabric that has an established CASE session. Trust roots cannot be written without a secure channel. This command has no response (returns a standard Status = Success status code on success, not a NOCResponse).
Attributes
The OperationalCredentials Cluster has 6 attributes, divided into Fabric information and capacity management groups. Click an attribute ID in the summary table below to jump to its detailed description.
| ID | Name | Type | Group | Description |
|---|---|---|---|---|
0x0000 |
NOCs | list<NOCStruct> | Fabric Info | NOC and ICAC certificates for each Fabric |
0x0001 |
Fabrics | list<FabricDescriptorStruct> | Fabric Info | List of joined Fabric descriptions |
0x0002 |
SupportedFabrics | uint8 | Capacity Management | Maximum number of Fabrics the device supports |
0x0003 |
CommissionedFabrics | uint8 | Capacity Management | Number of Fabrics currently joined |
0x0004 |
TrustedRootCertificates | list<octstr> | Fabric Info | List of installed trusted root certificates |
0x0005 |
CurrentFabricIndex | uint8 | Capacity Management | Fabric index of the current operation context |
Fabric Info (0x0000, 0x0001, 0x0004)
Describes the certificates, identities, and trust root information for each Fabric the device has joined.
| ID | Name | Type | Description |
|---|---|---|---|
0x0000 |
NOCs NOC List |
list<NOCStruct> | Each Fabric corresponds to one NOCStruct, containing that Fabric's NOC and ICAC certificates. Fabric-scoped: Each Fabric can only read its own entry, not other Fabrics' NOCs |
0x0001 |
Fabrics Fabric List |
list<FabricDescriptorStruct> | Description information for all joined Fabrics. Unlike NOCs, all Fabrics can read the complete list (but without certificate content, only public information like public key digests) |
0x0004 |
TrustedRootCertificates Trusted Root Certificate List |
list<octstr> | List of installed Root CA public key certificates (DER-encoded). Each Fabric corresponds to one trust root. Added via AddTrustedRootCertificate |
NOCs attribute is Fabric-scoped — Fabric A reading NOCs can only see its own NOC, not Fabric B's.
This is a security design: NOC contains that Fabric's operational key public key, which should not be exposed to other Fabrics.
Fabrics attribute is globally visible — any Fabric can see which Fabrics the device has joined and their public information (Root public key, VendorID, FabricID, NodeID, Label).
Capacity Management (0x0002, 0x0003, 0x0005)
Describes the device's Fabric capacity and current operation context.
| ID | Name | Type | Description |
|---|---|---|---|
0x0002 |
SupportedFabrics Max Fabrics |
uint8 | Maximum number of Fabrics the device can join simultaneously. The Matter specification requires support for at least 5. This value is fixed at factory and cannot be modified |
0x0003 |
CommissionedFabrics Joined Fabric Count |
uint8 | Number of Fabrics currently actually joined. When CommissionedFabrics ≥ SupportedFabrics, the device cannot join new Fabrics (AddNOC returns TableFull) |
0x0005 |
CurrentFabricIndex Current Fabric Index |
uint8 | Fabric index of the current communication session. Reading this attribute tells you "which Fabric am I." A value of 0 means no associated Fabric (e.g., in a PASE session) |
Before initiating multi-admin commissioning, read SupportedFabrics and CommissionedFabrics first
to confirm available slots. If full, use RemoveFabric to remove an unused Fabric first.
Enum Definitions
NodeOperationalCertStatusEnum
Unified return status code for AddNOC, UpdateNOC, UpdateFabricLabel, and RemoveFabric commands (StatusCode field in NOCResponse).
CertificateChainTypeEnum
Specifies the certificate type to retrieve in the CertificateChainRequest command.
Data Structures
NOCStruct
Each element in the NOCs attribute list, containing a Fabric's NOC and optional ICAC certificate.
| Field | Type | Description |
|---|---|---|
| NOC | octstr | Node Operational Certificate (DER-encoded). Contains the device's NodeID, FabricID, and operational public key in this Fabric |
| ICAC | octstr / null | Intermediate CA certificate. null if NOC is directly issued by Root CA |
| FabricIndex | uint8 | Fabric index this entry belongs to |
FabricDescriptorStruct
Each element in the Fabrics attribute list, describing a Fabric's public information.
| Field | Type | Description |
|---|---|---|
| RootPublicKey | octstr (65 bytes) | This Fabric's Root CA public key (uncompressed EC P-256 point, 65 bytes) |
| VendorID | uint16 | Vendor ID of the manufacturer that issued this Fabric's credentials (e.g., Apple = 0x1349, Google = 0x6006) |
| FabricID | uint64 | Fabric identifier. Different Fabrics under the same Root CA are distinguished by this value |
| NodeID | uint64 | Device's node ID in this Fabric. The same device has different NodeIDs in different Fabrics |
| Label | string (max 32) | User-defined label (modified via UpdateFabricLabel), e.g., "Home", "Office" |
| FabricIndex | uint8 | Index number of this Fabric (unique within the device, used to specify in RemoveFabric) |
When the same device is commissioned by both Apple Home and Google Home, there will be two FabricDescriptor entries — VendorIDs being Apple's and Google's respectively, with different FabricIDs and NodeIDs. The device uses FabricIndex to distinguish different Fabric contexts, including ACL permissions and subscriptions.
Example Data
The following is the OperationalCredentials attribute read result of a Matter device that has joined one Fabric (excluding NOCs, as Fabric-scoped restriction only allows reading your own):
{
// --- Fabric Info ---
"0x0001": [{ // Fabrics — Joined Fabric list
"rootPublicKey": "BNkX2...", // Root CA public key (Base64)
"vendorID": 65521, // VendorID = 0xFFF1 (test vendor)
"fabricID": 1, // FabricID = 1
"nodeID": 1234, // This device's NodeID in this Fabric
"label": "Home", // User-defined label
"fabricIndex": 1 // Fabric index
}],
// --- Capacity & Count ---
"0x0002": 5, // SupportedFabrics = 5 (max 5 Fabrics)
"0x0003": 1, // CommissionedFabrics = 1 (currently joined 1)
// --- Trusted Root Certificates ---
"0x0004": [ // TrustedRootCertificates — Trusted Root CA list
"MIIBnT..." // One Root CA certificate per Fabric (Base64 DER)
],
// --- Current Context ---
"0x0005": 1 // CurrentFabricIndex = 1 (current operation's Fabric)
}
CSR Flow Interaction Example
Interaction during commissioning where the Commissioner requests the device to generate a CSR:
// 1. Commissioner → Device: Request CSR generation
{
"invokeRequests": [{
"commandPath": {
"endpointId": 0,
"clusterId": "0x003E",
"commandId": "0x04" // CSRRequest
},
"commandFields": {
"CSRNonce": "dGhpcyBpcyBhIDMyLWJ5dGUgbm9uY2U=" // 32-byte random number (Base64)
}
}]
}
// Device → Commissioner: Return CSR
{
"NOCSRElements": "MIHd...", // NOCSR structure (containing CSR + CSRNonce)
"attestationSignature": "MEU..." // Device signs with DAC private key
}
AddNOC Interaction Example
Commissioner writes the issued NOC to the device:
// 2. Commissioner → Device: Write the signed NOC
{
"invokeRequests": [{
"commandPath": {
"endpointId": 0,
"clusterId": "0x003E",
"commandId": "0x06" // AddNOC
},
"commandFields": {
"NOCValue": "MIIB...", // Issued NOC certificate (DER Base64)
"ICACValue": "MIIB...", // Optional intermediate CA certificate
"IPKValue": "wMs7...", // 16-byte Identity Protection Key
"caseAdminSubject": 112233, // CASE administrator's Subject (NodeID)
"adminVendorId": 65521 // Administrator's VendorID
}
}]
}
// Device → Commissioner: Return result
{
"statusCode": 0, // OK
"fabricIndex": 1 // Newly assigned FabricIndex
}
In practice, these commands are typically orchestrated automatically by the platform's Commissioning SDK (e.g., Android CHIPTool, iOS Matter.framework). However, when debugging commissioning failures, understanding each step's parameter meaning is crucial — especially issues like CSRNonce mismatch, NOC signature verification failure, and Fabric table full.
Common Scenarios
Scenario 1: First Commissioning — Complete NOC Installation Flow
A newly manufactured Matter device being commissioned by a phone App for the first time, the complete certificate installation flow is:
- App establishes a PASE session with the device via BLE or SoftAP (using the device's Passcode)
- App sends
AttestationRequest (0x00), verifies DAC signature upon receivingAttestationResponse - App sends
CertificateChainRequest (0x02, type=1)to get DAC certificate - App sends
CertificateChainRequest (0x02, type=2)to get PAI certificate - App verifies the complete trust chain: DAC → PAI → PAA (PAA obtained from DCL or locally)
- App sends
AddTrustedRootCertificate (0x0B)to write its own Root CA certificate to the device - App sends
CSRRequest (0x04), device generates key pair and returns CSR - App's CA issues NOC certificate based on the CSR
- App sends
AddNOC (0x06)to write NOC, ICAC (optional), and IPK to the device - Device returns NOCResponse (StatusCode=OK, FabricIndex=1)
- PASE session ends, App and device establish a CASE session (based on NOC certificate)
Scenario 2: Multi-Admin — Same Device Joining Multiple Platforms
User first commissions with Apple Home, then commissions the same device with Google Home:
- Apple Home has completed commissioning, device has Fabric 1 (Apple's Root CA, VendorID, NodeID)
- User opens the "multi-admin pairing window" in Apple Home (via Administrator Commissioning Cluster's OpenCommissioningWindow)
- Google Home discovers the device and connects via a new PASE session
- Google Home repeats steps 2-10 of Scenario 1, using Google's own Root CA to issue NOC
- Device now has Fabric 1 (Apple) and Fabric 2 (Google), operating independently
- Reading the
Fabricsattribute shows two FabricDescriptorStruct entries - Reading
CommissionedFabricsreturns 2,SupportedFabricsremains the factory value (e.g., 5)
Scenario 3: Removing a Fabric — Unpairing or Factory Reset
User wants to remove a device from a specific platform:
- App reads
Fabrics (0x0001)to get all Fabric list - App reads
CurrentFabricIndex (0x0005)to confirm its own FabricIndex - App sends
RemoveFabric (0x0A)with its own FabricIndex - Device deletes the Fabric's NOC, Root certificate, ACL, and all associated data
- If other Fabrics remain on the device, it continues operating normally; if this was the last Fabric, the device returns to uncommissioned state
Note: RemoveFabric can specify any FabricIndex (not limited to your own Fabric), but typically only administrator privileges (Administrator ACL) allow execution.
Scenario 4: Certificate Rotation — Updating an Existing NOC
When the NOC is approaching expiration or key rotation is needed due to security policy:
- App sends
CSRRequest (0x04)withIsForUpdateNOC = true - Device generates new key pair and returns new CSR
- App's CA issues new NOC based on the new CSR (keeping the same NodeID and FabricID)
- App sends
UpdateNOC (0x07)to write the new NOC - Old NOC is replaced, FabricIndex remains unchanged, CASE session needs to be re-established