Matter::Cluster::GroupKeyManagementCluster
Inherits Matter::Cluster::Base < Reference < Object
Group Key Management Cluster (0x003F) Matter Core Specification §11.2
Manages group keys for secure group communication:
- Group key sets for shared encryption keys
- Mapping between groups and key sets
- Identity Protection Keys (IPK) for CASE session establishment
- Operational group keys for group messaging
Key Features:
- Fabric-scoped: All data isolated per fabric
- IPK Protection: KeySet 0 (IPK) cannot be removed
- Strict Validation: Epoch keys must be ordered, security policies enforced
- Cryptographic Operations: HKDF-based key derivation for operational keys
Constants
Attribute IDs
Global attributes
Constructors
Initialize the cluster
Class methods
Group Key Management Cluster (0x003F) Matter Core Specification §11.2
Manages group keys for secure group communication:
- Group key sets for shared encryption keys
- Mapping between groups and key sets
- Identity Protection Keys (IPK) for CASE session establishment
- Operational group keys for group messaging
Key Features:
- Fabric-scoped: All data isolated per fabric
- IPK Protection: KeySet 0 (IPK) cannot be removed
- Strict Validation: Epoch keys must be ordered, security policies enforced
- Cryptographic Operations: HKDF-based key derivation for operational keys
Instance methods
Add a group to the group table Called by Groups cluster when AddGroup command is executed
Validations:
- Group must have a corresponding key map entry
- Must not exceed max_groups_per_fabric
Add or update a group key map entry Links a group to a key set within a fabric
Validations:
- Group ID must not be 0
- Key set must exist in the fabric
- Must not exceed max_groups_per_fabric
Get a key set by ID (for cryptographic operations) Returns the actual key set with key material
Get all key set IDs for a fabric (for testing)
Check if a group exists for a fabric
Get group key map for the specified fabric
Get group table for the specified fabric
KeySetRead command handler Matter Core Spec §11.2.8.2
Returns a key set by ID, but with actual key material removed for security. Returns null if key set not found for this fabric.
KeySetReadAllIndices command handler Matter Core Spec §11.2.8.4
Returns list of all key set IDs for the accessing fabric.
KeySetRemove command handler Matter Core Spec §11.2.8.3
Removes a key set by ID. Special rules:
- Cannot remove key set 0 (IPK - Identity Protection Key)
- Removes any group key map entries referencing this key set
- Returns error if key set not found
KeySetWrite command handler Matter Core Spec §11.2.8.1
Creates or updates a group key set. Performs extensive validation:
- Validates key set structure (epoch ordering, key lengths, etc.)
- Enforces max_group_keys_per_fabric limit
- Prevents creation of duplicate key set IDs within fabric
- Security policy must be TrustFirst
Read an attribute value The fabric_index parameter is optional and used for fabric-scoped attributes like CurrentFabricIndex in OperationalCredentialsCluster
Remove an endpoint from a group Called by Groups cluster when RemoveGroup command is executed
Remove a group key map entry
Restore cluster state from JSON. Override in subclasses that need to restore state. The json parameter is the string returned by save_state.
Save cluster state to JSON for persistence. Override in subclasses that need to persist state (e.g., scenes, groups). Returns nil if no state needs to be persisted.
Nested types
- Matter::Cluster::GroupKeyManagementCluster::Feature
- Matter::Cluster::GroupKeyManagementCluster::GroupInfoMapStruct
- Matter::Cluster::GroupKeyManagementCluster::GroupKeyMapStruct
- Matter::Cluster::GroupKeyManagementCluster::GroupKeyMulticastPolicyEnum
- Matter::Cluster::GroupKeyManagementCluster::GroupKeySecurityPolicyEnum
- Matter::Cluster::GroupKeyManagementCluster::GroupKeySetStruct
- Matter::Cluster::GroupKeyManagementCluster::KeySetReadAllIndicesResponse
- Matter::Cluster::GroupKeyManagementCluster::KeySetReadRequest
- Matter::Cluster::GroupKeyManagementCluster::KeySetReadResponse
- Matter::Cluster::GroupKeyManagementCluster::KeySetRemoveRequest
- Matter::Cluster::GroupKeyManagementCluster::KeySetWriteRequest