| Previous | Next |
| NTE_BAD_LEN | NTE_BAD_SIGNATURE |
NTE_BAD_DATA
NTE_BAD_DATA (0x80090005) is a CryptoAPI provider error whose precise meaning depends on the API that returned it. For decryption, it commonly indicates ciphertext that cannot be processed with the supplied key and parameters, such as invalid padding or an invalid block length.
Typical decryption causes
With CryptDecrypt, a block-cipher input must have a length that matches the block size unless the call is the final part of a stream. Windows can also return this error when padding is invalid. Truncated ciphertext, a mismatched key or algorithm, and incorrectly split streaming input can all produce the same result.
What to verify
- Preserve the exact encrypted byte sequence and length; do not convert binary data through text encodings.
- Check that encryption and decryption use compatible algorithm, key, mode, padding, and initialization-vector handling.
- For streaming operations, mark only the final chunk as final and keep the same cryptographic state across earlier chunks.
- Treat this as an integrity or protocol mismatch until proven otherwise, not as a signal to retry the same invalid data repeatedly.
See Microsoft documentation for CryptDecrypt.
Looking for a different code? Search another status or error code.