Cannot decrypt file after clearing cache
Stephen Jeffrey
stephen_j_jeffrey at yahoo.com.au
Wed Nov 24 12:39:15 CET 2021
Hi all,
I wish to encrypt a file with a passphrase, possibly copy the file elsewhere, and decrypt using the same passphrase.
If I encrypt a file (with a passphrase) it can then be decypted without entering a passphrase:> echo "test" > test.txt> gpg -c test.txt> gpg -d test.txt.gpg gpg: AES256.CFB encrypted datagpg: encrypted with 1 passphrasetest
I assume it does not prompt me for a passphrase because it is cached.
If I clear the password cache, and then try to decrypt, the decryption fails (it does not prompt for a password):> gpg-connect-agent reloadagent /byeOK> gpg -d test.txt.gpggpg: AES256.CFB encrypted datagpg: problem with the agent: End of filegpg: encrypted with 1 passphrasegpg: decryption failed: Bad session key
Rebooting the machine does not fix the problem i.e. if I reboot and try to decrypt the file, it fails with the same error (Bad session key). In this case however it does prompt me for the password. After entering the password it fails.
I am using a fresh install of Fedora 35 and gpg2 version 2.3.2.
Why is it failing after I clear the cache?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.gnupg.org/pipermail/gnupg-users/attachments/20211124/a3d549f7/attachment-0001.html>
More information about the Gnupg-users
mailing list