| Previous | Next |
| STATUS_CANNOT_BREAK_OPLOCK | STATUS_BAD_DATA |
STATUS_BAD_KEY
The supplied key cannot be accepted
STATUS_BAD_KEY indicates that a key used by the operation is invalid. Depending on the API, “key” may mean cryptographic key material, a registry-style identifier, a database key, or another opaque lookup token. The call site determines which interpretation applies.
What to validate
- Confirm the expected key type, encoding, size, provider, and algorithm.
- Check that imported key blobs have the required header and complete payload.
- Verify that the key belongs to the current session or object and has not expired or been destroyed.
- Do not log secret key bytes; log metadata and a nonreversible identifier instead.
Recovery
Recreate or reacquire the key from its authoritative source. Retrying with the same malformed data is not useful. If the failure follows migration or restore, check provider compatibility, machine-bound protection, permissions, and whether the key was exported in a supported format.
References
Looking for a different code? Search another status or error code.