MatterEx.Crypto.GroupKey (matter_ex v0.3.1)

Copy Markdown View Source

Matter group key derivation.

Derives operational group keys, per-group encryption keys, and group session IDs from epoch keys per Matter Core Specification section 4.15.3.

Summary

Functions

Derive the encryption key for a specific group.

Derive the operational group key from an epoch key.

Derive the privacy key from an operational group key.

Derive the group session ID from an operational group key.

Functions

encryption_key(operational_key, group_id)

@spec encryption_key(binary(), non_neg_integer()) :: binary()

Derive the encryption key for a specific group.

GroupEncryptKey = HKDF(salt="", ikm=OperationalGroupKey, info="GroupMessaging" || GroupId_LE16, length=16)

operational_key(epoch_key)

@spec operational_key(binary()) :: binary()

Derive the operational group key from an epoch key.

OperationalGroupKey = HKDF(salt="", ikm=EpochKey, info="GroupKey v1.0", length=16)

privacy_key(operational_key)

@spec privacy_key(binary()) :: binary()

Derive the privacy key from an operational group key.

GroupPrivacyKey = HKDF(salt="", ikm=OperationalGroupKey, info="GroupPrivacy", length=16)

session_id(operational_key)

@spec session_id(binary()) :: non_neg_integer()

Derive the group session ID from an operational group key.

Lower 16 bits of HMAC-SHA256(OperationalGroupKey, "GroupSession").