pub enum KeyError {
Show 20 variants
DeviceIdEncoding,
StoreClosed,
File(FileError),
Crypto(CryptoError),
Material(MaterialError),
PassphraseAuthentication,
PassphraseHeader,
PassphraseParameters,
Unavailable(Box<dyn Error + Send + Sync>),
Keychain(KeychainError),
KeychainTemporarilyUnavailable(KeychainError),
MissingKeychainEntitlement(KeychainError),
InvalidServiceName,
Unsupported,
SavedEntriesFull,
SavedEntryTooLarge,
Left,
RestoreCodeStoreId,
Shutdown(Shutdown),
Bug(Bug),
}Expand description
A failure unlocking, keeping or forgetting keys or host secrets (E11).
Variants§
DeviceIdEncoding
The device-only installation id is malformed.
StoreClosed
The handle that owns this custody has closed.
File(FileError)
A filesystem operation failed; the cause says whether bytes changed.
Crypto(CryptoError)
A cryptographic service was unavailable or stored bytes failed validation.
Material(MaterialError)
Decrypted or keychain-provided material was malformed.
PassphraseAuthentication
A wrong passphrase or altered file failed authentication.
PassphraseHeader
The passphrase file’s header was malformed or unsupported.
PassphraseParameters
Recorded Argon2id parameters exceed the accepted resource bounds.
The device lacks resources needed to unlock or keep keys.
Keychain(KeychainError)
The OS credential store refused an operation.
Custody cannot be accessed right now, but the same call succeeds once the session unlocks: native NoStorageAccess, or on Apple errSecInteractionNotAllowed (OSStatus -25308), which a locked device, a sleeping display or a session that can’t show UI answers (§12.4). The native cause says why access was denied.
MissingKeychainEntitlement(KeychainError)
Apple’s errSecMissingEntitlement (OSStatus -34018): the app has no keychain-access-groups entitlement backed by a provisioning profile. Every keychain call fails the same way until the app is signed with one; retrying changes nothing.
InvalidServiceName
The service name is empty or contains a NUL.
Unsupported
The person’s entries need iCloud Keychain or Block Store: Apple platforms, or an Android phone with Google Play services.
SavedEntriesFull
Block Store already holds its 16 entries for the app, so a new entry can’t be saved (§13.1). Forgetting a saved code makes room.
SavedEntryTooLarge
A saved code doesn’t fit in Block Store’s 1,024 bytes for an entry, even with the store’s name shortened (§13.1).
Left
The person left the store, so their saved entries stay deleted (§14.1).
RestoreCodeStoreId
A saved restore-code account’s id part is not a store id as coven writes it.
Shutdown(Shutdown)
The call’s runtime is shutting down and dropped it partway, so what it changed in custody is unknown (E15).
Bug(Bug)
The call’s custody work panicked: a bug, which the caller reports (E15). What it changed in custody is unknown.