The Identity Commitment is a 32-byte hash of the state fields.

We treat everything as bytes and concatenate in a fixed order.

identity_commitment = Hash(
    "LIVRE_ID_V1" ||
    identity_id ||
    uint32(version) ||
    control_key_commitment ||
    recovery_key_commitment ||
    attributes_root ||
    policies_root ||
    uint64(timestamp) ||
    state_nonce ||
    prev_commitment
)

Where:

Invariant: for a given identity_id, any change to keys, attributes or policies MUST produce a new identity_commitment.