40eb128cb8
Add encrypted local storage for MLS group state so groups survive app restarts, plus key lifecycle management: - MlsGroupState: TLS-encoded serializable snapshot of complete group state (group context, ratchet tree, epoch secrets, private keys, transcript hash) - MlsGroupStateStore: interface for encrypted per-group storage (platform implementations provide EncryptedSharedPreferences / encrypted file) - MlsGroupManager: high-level coordinator managing group lifecycle, epoch secret retention window (N-1 for late messages), state persistence, and key export - RetainedEpochSecrets: bounded window of past epoch decryption secrets for out-of-order message handling - MlsGroup.saveState()/restore(): roundtrip serialization via TLS codec - MlsGroup.proposeSigningKeyRotation(): Update proposal with fresh Ed25519 signing key and X25519 encryption key for forward secrecy - KeyPackageRotationManager: tracks consumed KeyPackages after Welcome processing, handles slot rotation and proactive age-based rotation - Tests: 16 tests covering state serialization roundtrips, manager lifecycle, multi-group independence, and signing key rotation persistence https://claude.ai/code/session_01MuRS2zSVm6A36HNFwG7M5p