ClientRecordCipher
Seals and opens the sensitive client storage records with one storage key (docs/storage-encryption.md). Storage adapters store the sealed bytes as they are; they never handle keys, formats or associated data themselves.
Every sealed record is bound to its record type and to the row key given here: a record opened as another type or under another key fails with StorageEncryptionException.AuthenticationFailed. Opening never returns a partial or default value; every failure throws a StorageEncryptionException.
Properties
The key this cipher seals with (the current storage key).
The keys this cipher opens records of: keyId and, during a storage key rotation, the retained previous key (docs/storage-key-rotation.md).
Functions
The whole device authentication key pair (docs/server-authentication.md).
The whole pending replacement key pair of a last-device recovery (docs/last-device-recovery.md). Its own record type, so it never opens as the active, the recovery or the rotation key or the other way round.
The whole pending replacement key pair of a device recovery (docs/device-recovery.md). Its own record type, so it never opens as the active key or the other way round.
The whole pending replacement key pair of a routine device authentication key rotation (docs/device-authentication-rotation.md). Its own record type, so it never opens as the active or the recovery key or the other way round.
The whole identity key pair.
A record with no content that proves the key when opened.
Seals the legacy plaintext migration intent (record type 13, S1): proof, under the storage key created for it, that this key was created for an interrupted plaintext → encrypted migration of a database from before record encryption. Its only content is a fixed marker.
Public and private key, bound to the prekey ID.
A pending message frame, bound to the recipient and the logical message ID.
A received message frame not yet committed by the application (docs/application-delivery.md), bound to the sender and the logical message ID. Its own record type, so it never opens as a sent frame.
The 32-byte content digest of a committed received message (docs/application-delivery.md), bound to the sender and the logical message ID.
The session state, bound to the remote address.
Public key, signature and private key, bound to the prekey ID.
Throws StorageEncryptionException unless sealed is a key check sealed with this key.
Opens a migration intent sealed by sealMigrationIntent. Throws StorageEncryptionException if it was not sealed with this cipher's key as a migration intent (a key check or any other record does not count).