General and node management63 — Group Key Management

Matter Cluster 63 — Group Key Management

Matter Cluster 63 (0x003F) Group Key Management: attributes, commands, events, data types, shadow paths and bridge payload examples.

Matter Cluster 63 — Group Key Management Cluster

Matter Cluster 63, also written as 0x003F, is the Group Key Management Cluster. The Group Key Management cluster manages shared symmetric keys for the node. The cluster is scoped to the node and is a singleton for the node. This cluster maintains a list of groups supported by the node.

Cluster Identity

FieldValue
Cluster ID decimal63
Cluster ID hex0x003F
Cluster nameGroup Key Management
Cluster revision (Matter 1.6.1)4
Roleutility
ScopeNode
PICS codeGRPKEY
Typical endpoint0

Revision history

RevisionChange
1Initial revision
2Clarify KeySetWrite validation and behavior on invalid epoch key lengths
3Refocus on pure key management; introduce Groupcast feature associated with Groupcast cluster
4Add "C" quality to GroupKeyMap attribute

Shadow Path Format

Cluster 63 values in the device shadow use this format:

endpoint_id / 63 / attribute_id

Example:

{
  "0/63/2": 1
}
PartMeaning
0Endpoint ID
63Group Key Management cluster
2MaxGroupsPerFabric attribute

Cluster 63 Features

The FeatureMap attribute (0/63/65532) is a bitmap. Each bit set means the device implements that feature and the attributes and commands that depend on it.

BitCodeFeatureConformanceMeaning
0CSCacheAndSyncPThe ability to support CacheAndSync security policy and MCSP
1GCASTGroupcastP, OThe device supports groups using the Groupcast cluster

Example: FeatureMap = 0 means no optional feature is enabled; 3 means every feature listed above is enabled.


Data Types

GroupKeyMulticastPolicyEnum

ValueNameConformanceMeaning
0PerGroupIDMIndicates filtering of multicast messages for a specific Group ID
1AllNodesMIndicates not filtering of multicast messages

GroupKeySecurityPolicyEnum

ValueNameConformanceMeaning
0TrustFirstMMessage counter synchronization using trust-first
1CacheAndSyncP, CSMessage counter synchronization using cache-and-sync

GroupInfoMapStruct (struct) — fabric-scoped

FieldNameTypeConformanceConstraintMeaning
1GroupIdgroup-idM—This field uniquely identifies the group within the scope of the given Fabric.
2Endpointslist of endpoint-noMmin 1 entriesThis field provides the list of Endpoint IDs on the Node to which messages to this group is forwarded.
3GroupNamestringOmax length 16This field provides a name for the group.

GroupKeyMapStruct (struct) — fabric-scoped

FieldNameTypeConformanceConstraintMeaning
1GroupIdgroup-idM—This field uniquely identifies the group within the scope of the given Fabric.
2GroupKeySetIDuint16M1 to 65535—

GroupKeySetStruct (struct) — fabric-scoped

FieldNameTypeConformanceConstraintMeaning
0GroupKeySetIDuint16M——
1GroupKeySecurityPolicyGroupKeySecurityPolicyEnumM—This field provides the security policy for an operational group key set.
2EpochKey0octstr (nullable)Mallowed: 16This field, if not null, is the InputKey used in the derivation of an OperationalGroupKey for epoch slot 0 of the given group key set.
3EpochStartTime0epoch-us (nullable)M—Units are absolute UTC time in microseconds encoded using the epoch-us representation.
4EpochKey1octstr (nullable)Mallowed: 16This field, if not null, is the InputKey used in the derivation of an OperationalGroupKey for epoch slot 1 of the given group key set.
5EpochStartTime1epoch-us (nullable)M—Units are absolute UTC time in microseconds encoded using the epoch-us representation.
6EpochKey2octstr (nullable)Mallowed: 16If the GCAST feature bit is set in the FeatureMap, this field is null, unless the GroupKeySetId is 0 (the Identity Protection Key).
7EpochStartTime2epoch-us (nullable)M—If the GCAST feature bit is set in the FeatureMap, this field is null, unless the GroupKeySetId is 0 (the Identity Protection Key).
8GroupKeyMulticastPolicyGroupKeyMulticastPolicyEnumD——

GroupcastAdoptionStruct (struct) — fabric-scoped

FieldNameTypeConformanceConstraintMeaning
0GroupcastAdoptedboolM—Indicates whether Groupcast was adopted by the associated Fabric's administrators.

Cluster 63 Attributes

Cluster 63 defines 5 attributes plus the global attributes. Conformance: M mandatory, O optional, a feature code means "mandatory when that feature is present", square brackets mean "optional when …".

IDHexAttributeTypeConformanceAccessQualitiesDefault
00x0000GroupKeyMaplist of GroupKeyMapStructMR/W (read: view, write: manage, fabric-scoped)persisted, change omittedempty
10x0001GroupTablelist of GroupInfoMapStructMR (read: view, fabric-scoped)—empty
20x0002MaxGroupsPerFabricuint16MR (read: view)—0
30x0003MaxGroupKeysPerFabricuint16MR (read: view)—1
40x0004GroupcastAdoptionlist of GroupcastAdoptionStructP, GCASTR/W (read: admin, write: admin, fabric-scoped)persisted—

Global attributes

IDHexAttributeMeaning
655280xFFF8GeneratedCommandListResponse command IDs this server generates.
655290xFFF9AcceptedCommandListCommand IDs this server accepts.
655310xFFFBAttributeListAttribute IDs implemented.
655320xFFFCFeatureMapImplemented optional features (see above).
655330xFFFDClusterRevisionCluster revision implemented; 4 for a Matter 1.6.1 device.

Attribute Details

Attribute 0 / 0x0000 — GroupKeyMap

Path example:

0/63/0

If the GCAST feature bit is set in the FeatureMap attribute, the following rules apply to the accessing Fabric: - When Groupcast is adopted (the GroupcastAdoption entry has GroupcastAdopted set to true): - This attribute is empty. - Any attempt to write to this attribute must fail with an INVALID_IN_STATE status code. - Otherwise (Groupcast is not adopted or the entry is missing): - This attribute contains the Group Key Set mappings derived from the Groupcast cluster's Membership attribute (one mapping per group per fabric). - GroupKeyMapStruct entry updates must cause the associated Groupcast cluster's Membership attribute (by GroupID) to be updated with the provided GroupKeySetID.

PropertyValue
Typelist of GroupKeyMapStruct
ConformanceM
AccessR/W (read: view, write: manage, fabric-scoped)
Qualitiespersisted, change omitted
Constraintdesc
Defaultempty

Each entry is a GroupKeyMapStruct (see Data Types).

Example:

{
  "0/63/0": []
}

Attribute 1 / 0x0001 — GroupTable

Path example:

0/63/1

If the GCAST feature is set in the FeatureMap: - If the GroupcastAdoption attribute has an entry for the accessing Fabric and that entry has the GroupcastAdopted field set to true, then this field is empty. - Else this attribute contains the Group mappings computed in equivalence to the Groupcast cluster's Membership attribute (one mapping per group per fabric). This attribute is a list of GroupInfoMapStruct entries. Each entry provides read-only information about how a given logical Group ID maps to a particular set of endpoints, and a name for the group.

PropertyValue
Typelist of GroupInfoMapStruct
ConformanceM
AccessR (read: view, fabric-scoped)
Constraintdesc
Defaultempty

Each entry is a GroupInfoMapStruct (see Data Types).

Example:

{
  "0/63/1": []
}

Attribute 2 / 0x0002 — MaxGroupsPerFabric

Path example:

0/63/2

If the Groupcast support is enabled (GCAST feature is set), this is set to 0 indicating group management is done using the Groupcast cluster and not the legacy Groups cluster. Indicates the maximum number of legacy groups that this node supports per fabric. For legacy usage, the value of this attribute is set to be no less than the required minimum supported groups. The length of the GroupKeyMap and GroupTable list attributes must NOT exceed the value of the MaxGroupsPerFabric attribute multiplied by the number of supported fabrics.

PropertyValue
Typeuint16
ConformanceM
AccessR (read: view)
Default0

Example:

{
  "0/63/2": 1
}

Attribute 3 / 0x0003 — MaxGroupKeysPerFabric

Path example:

0/63/3

Indicates the maximum number of group key sets this node supports per fabric. The value of this attribute is set according to the minimum number of group key sets to support.

PropertyValue
Typeuint16
ConformanceM
AccessR (read: view)
Constraint1 to 65535
Default1

Example:

{
  "0/63/3": 1
}

Attribute 4 / 0x0004 — GroupcastAdoption

Path example:

0/63/4

Indicates whether the accessing fabric claims to have migrated to Groupcast. When a Fabric's entry has the GroupcastAdopted field set to true, the behavior of the GroupKeyMap and GroupTable attributes will change. There must NOT be more than 1 entry per fabric in this attribute. If a Fabric has not yet written an entry for themselves, the server must act as if that Fabric had written an entry with GroupcastAdopted set to false, even if not present in the list.

PropertyValue
Typelist of GroupcastAdoptionStruct
ConformanceP, GCAST
AccessR/W (read: admin, write: admin, fabric-scoped)
Qualitiespersisted
Constraintdesc

Each entry is a GroupcastAdoptionStruct (see Data Types).

Example:

{
  "0/63/4": []
}

Cluster 63 Commands

Cluster 63 has 4 client-to-server commands and 2 responses.

IDHexCommandDirectionConformanceResponseDescription
00x00KeySetWriteclient → serverMstatusThis command is used by Administrators to set the state of a given Group Key Set, including atomically updating the state of all epoch keys.
10x01KeySetReadclient → serverMKeySetReadResponseThis command is used by Administrators to read the state of a given Group Key Set.
20x02KeySetReadResponseserver → clientM—This command is generated in response to the KeySetRead command, if a valid Group Key Set was found.
30x03KeySetRemoveclient → serverMstatusThis command is used by Administrators to remove all state of a given Group Key Set.
40x04KeySetReadAllIndicesclient → serverMKeySetReadAllIndicesResponseThis command is used by Administrators to query a list of all Group Key Sets associated with the accessing fabric.
50x05KeySetReadAllIndicesResponseserver → clientM—This command is generated in response to KeySetReadAllIndices and it contains the list of GroupKeySetID for all Group Key Sets associated with the scoped Fabric.

AcceptedCommandList

The AcceptedCommandList attribute lists the command IDs the endpoint actually implements:

endpoint_id / 63 / 65529
{
  "0/63/65529": [
    0,
    1,
    3,
    4
  ]
}

Before sending a Cluster 63 command, check that the command ID exists in endpoint/63/65529. Optional commands are only present when the matching feature is set in FeatureMap.


Bridge Command Payload Format

The bridge accepts Matter commands in this structure:

{
  "message_id": "1",
  "command": "device_command",
  "args": {
    "endpoint_id": 0,
    "cluster_id": 63,
    "command_name": "KeySetWrite",
    "payload": {},
    "timed_request_timeout_ms": 1000
  }
}

For Cluster 63, always use "cluster_id": 63. Payload keys are the command field names in lowerCamelCase. Octet-string fields are base64-encoded. timed_request_timeout_ms is required for timed commands and ignored otherwise.


Command: KeySetWrite

Purpose

This command is used by Administrators to set the state of a given Group Key Set, including atomically updating the state of all epoch keys.

Command Identity

FieldValue
Command ID0
Command hex0x00
Command nameKeySetWrite
Directionclient → server
ConformanceM
Responsestatus
Access(invoke: admin, fabric-scoped)

Payload Fields

IDFieldPayload keyTypeConformanceConstraintMeaning
0GroupKeySetgroupKeySetGroupKeySetStructM——

Bridge Command Example

{
  "message_id": "1",
  "command": "device_command",
  "args": {
    "endpoint_id": 0,
    "cluster_id": 63,
    "command_name": "KeySetWrite",
    "payload": {
      "groupKeySet": {
        "groupKeySetID": 1,
        "groupKeySecurityPolicy": 0,
        "epochKey0": "AQID",
        "epochStartTime0": 0
      }
    }
  }
}

Command: KeySetRead

Purpose

This command is used by Administrators to read the state of a given Group Key Set.

Command Identity

FieldValue
Command ID1
Command hex0x01
Command nameKeySetRead
Directionclient → server
ConformanceM
ResponseKeySetReadResponse
Access(invoke: admin, fabric-scoped)

Payload Fields

IDFieldPayload keyTypeConformanceConstraintMeaning
0GroupKeySetIDgroupKeySetIDuint16M——

Bridge Command Example

{
  "message_id": "1",
  "command": "device_command",
  "args": {
    "endpoint_id": 0,
    "cluster_id": 63,
    "command_name": "KeySetRead",
    "payload": {
      "groupKeySetID": 1
    }
  }
}

The device answers with KeySetReadResponse (see below).


Command: KeySetReadResponse

Purpose

This command is generated in response to the KeySetRead command, if a valid Group Key Set was found. It contains the configuration of the requested Group Key Set, with the EpochKey0, EpochKey1 and EpochKey2 key contents replaced by null.

Command Identity

FieldValue
Command ID2
Command hex0x02
Command nameKeySetReadResponse
Directionserver → client (response)
ConformanceM

Response Fields

IDFieldPayload keyTypeConformanceConstraintMeaning
0GroupKeySetgroupKeySetGroupKeySetStructM——

Command: KeySetRemove

Purpose

This command is used by Administrators to remove all state of a given Group Key Set.

Command Identity

FieldValue
Command ID3
Command hex0x03
Command nameKeySetRemove
Directionclient → server
ConformanceM
Responsestatus
Access(invoke: admin, fabric-scoped)

Payload Fields

IDFieldPayload keyTypeConformanceConstraintMeaning
0GroupKeySetIDgroupKeySetIDuint16M——

Bridge Command Example

{
  "message_id": "1",
  "command": "device_command",
  "args": {
    "endpoint_id": 0,
    "cluster_id": 63,
    "command_name": "KeySetRemove",
    "payload": {
      "groupKeySetID": 1
    }
  }
}

Command: KeySetReadAllIndices

Purpose

This command is used by Administrators to query a list of all Group Key Sets associated with the accessing fabric.

Command Identity

FieldValue
Command ID4
Command hex0x04
Command nameKeySetReadAllIndices
Directionclient → server
ConformanceM
ResponseKeySetReadAllIndicesResponse
Access(invoke: admin, fabric-scoped)

Payload Fields

IDFieldPayload keyTypeConformanceConstraintMeaning
0DoNotUsedoNotUseX——

Bridge Command Example

{
  "message_id": "1",
  "command": "device_command",
  "args": {
    "endpoint_id": 0,
    "cluster_id": 63,
    "command_name": "KeySetReadAllIndices",
    "payload": {
      "doNotUse": 0
    }
  }
}

The device answers with KeySetReadAllIndicesResponse (see below).


Command: KeySetReadAllIndicesResponse

Purpose

This command is generated in response to KeySetReadAllIndices and it contains the list of GroupKeySetID for all Group Key Sets associated with the scoped Fabric.

Command Identity

FieldValue
Command ID5
Command hex0x05
Command nameKeySetReadAllIndicesResponse
Directionserver → client (response)
ConformanceM

Response Fields

IDFieldPayload keyTypeConformanceConstraintMeaning
0GroupKeySetIDsgroupKeySetIDslist of uint16M——

Cluster 63 Events

Cluster 63 defines no events.


SmartphoneKey Notes

  • Cluster 63 is present on SmartphoneKey devices or hubs today. See Matter Bridge Clusters — Detailed Reference and Matter Device Attributes & Commands for the values the bridge actually reports.
  • Shadow paths follow endpoint/63/attribute; attribute values that the device reports as unreadable are written as n/a.
  • Attribute IDs, command IDs and enum values on this page come from the CSA Matter 1.6.1 data model; descriptions are condensed from the specification text.