Symmetric Encryption Troubleshooting
Cheat sheet · https://pcornel.dk/topic.php?topic=4695
Answer
Troubleshoot symmetric encryption by checking that both sides use the same algorithm, mode, key length, key and IV or nonce, the padding scheme, encoding (base64 or hex) and that authentication tags verify.
Remember
- Algorithm, mode, key, IV and padding must match.
- Encoding (base64/hex) errors are common.
- Authentication tag failures mean tampering or wrong key.
First checks
openssl enc/age/gpg error messages— bad decrypt/tag- Key and nonce/IV used — match
- Library versions — compatibility
Commands
openssl enc -list- Read-only/validation observation for symmetric cipher implementations available in the installed OpenSSL build.
Verify in this order
ciphertext + key + params → decrypt → verify
Where it usually breaks
First mismatch in key/secret generation → storage/rotation → trust/certificate validation → protocol negotiation → cryptographic operation → peer/application verification; preserve identity/policy/pre-state before mutation.
Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=4695