An application stores ciphertext produced by a Vault transit key named `orders` in a database. The security team rotates the key with `vault write -f transit/keys/orders/rotate`. After rotation, the application reports that decryption of previously stored records fails. The key was never deleted or reconfigured. What is the most likely cause?
Transit ciphertext carries a version prefix such as `vault:v1:`. Vault uses that prefix to select the correct historical key version during decryption. If the application trimmed, truncated, or otherwise modified the stored ciphertext, Vault cannot identify the version and decryption fails even though all key versions are still present.
Why this answer
Transit ciphertext embeds the key version in a prefix like `vault:v1:`, and Vault relies on that prefix to choose which key version decrypts the data. Rotation adds a new version without invalidating old ones, so decryption normally continues to work. When it fails after rotation while the key still exists, the prefix has usually been stripped or corrupted in storage, removing Vault's ability to identify the correct version.
Exam trap
The trap here is blaming rotation for breaking decryption, when the real issue is treating the version prefix as disposable metadata.