# ADR-0004: Link Keys Are Persisted Externally

Status: Accepted

## Context

Link keys are security-sensitive and long-lived.
The protocol backend should not own persistent storage policy.

## Decision

Link encryption and HMAC keys are persisted externally
(e.g., Home Assistant config or storage).

- Backend accepts injected link keys.
- Backend does not manage secure storage.

## Rationale

Separating persistence from protocol logic avoids duplication,
simplifies testing, and aligns with Home Assistant architecture.

## Consequences

- Backend must tolerate missing or invalid link keys.
- Linking may be re-initiated when keys are unavailable.

## Scope / Non-Goals

- Does not mandate storage format.
- Does not define key rotation policy.

## References

- Home Assistant config entry model
