gpg not asking for passphrase to decrypt a file

Bug #1458967 reported by Phil Norisez

This bug report was converted into a question: question #267452: gpg not asking for passphrase to decrypt a file.

6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
gnupg (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

Ubuntu 12.04 LTS.

Signed Ubuntu Code of Conduct without issuet,
Decided to play with gpg to learn more about it, using the UCofC text for testing,
Saved the UCofC into UCC2,txt.
Encrypted the file into UCC2.gpg with command: gpg -r $USER -o UCC2.gpg --yes --symmetric -e UCC2.txt
This worked fine, asking me for the passphrase twice, as expected.
I gave it the one that I used to sign the UCofC for Launchpad.
Then, to test the decryption: gpg -d UCC2.gpg >UCC2_1.txt
Got the following messages:

'You need a passphrase to unlock the secret key for
'user: "Phillip Norisez (This is my key for Launchpad) <email address hidden>"
'2560-bit ELG-E key, ID F91FDEB0, created 2015-04-27 (main key ID 05B43F32)
'
'gpg: encrypted with 1 passphrase
'gpg: encrypted with 2560-bit ELG-E key, ID F91FDEB0, created 2015-04-27
 ' "Phillip Norisez (This is my key for Launchpad) <email address hidden>"'

All of which seems to indicate the decrypt did not work.
HOWEVER, diff UCC2_1.txt UCC2.txt DID NOT ERROR OUT AS EXPECTED.
It seems that the text actually was written out to the file, even though errors appeared.
Now, this leads me to ask the following:

Why did the decrypt seem to work OK in spite of the errors?

Why didn't gpg ask me for the passphrase? (I checked some old (ca 2009) posts that came up in a search for "gpg not asking" and found one that discussed checking the passphrase caching preferences for seahose, but I could not find them. I attributed this to the age of the posts; the preferences may have been deleted or moved.

So, how do I change the caching preferences? Or can I not do that?

Bottom line is that I expected gpg to ask me for the passphrase every time I try to decrypt the file. Is this a valid expectation?

Tags: bot-comment
Phil Norisez (norisezp)
description: updated
Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. It seems that your bug report is not filed about a specific source package though, rather it is just filed against Ubuntu in general. It is important that bug reports be filed about source packages so that people interested in the package can find the bugs about it. You can find some hints about determining what package your bug might be about at https://wiki.ubuntu.com/Bugs/FindRightPackage. You might also ask for help in the #ubuntu-bugs irc channel on Freenode.

To change the source package that this bug is filed about visit https://bugs.launchpad.net/ubuntu/+bug/1458967/+editstatus and add the package name in the text box next to the word Package.

[This is an automated message. I apologize if it reached you inappropriately; please just reply to this message indicating so.]

tags: added: bot-comment
Revision history for this message
Brian Murray (brian-murray) wrote :

Thank you for taking the time to report this issue and helping to make Ubuntu better. Examining the information you have given us, this does not appear to be a bug report so we are closing it and converting it to a question in the support tracker. We understand the difficulties you are facing, but it is better to raise problems you are having in the support tracker at https://answers.launchpad.net/ubuntu if you are uncertain if they are bugs. You can also find help posting your problem in the support forum of your local Ubuntu's community http://loco.ubuntu.com/ or asking at http://askubuntu.com. For help on reporting bugs, see https://help.ubuntu.com/community/ReportingBugs.

affects: ubuntu → gnupg (Ubuntu)
Changed in gnupg (Ubuntu):
status: New → Invalid
Revision history for this message
Phil Norisez (norisezp) wrote :

This was bug was reported from a question in launchpad. It was recommended there to submit a bug report. I refuse to get into a tail chasing exercise over this issue, so please close it out. Thank you.

Revision history for this message
Seth Arnold (seth-arnold) wrote :

I could have sworn I wrote a response to this weeks ago. Bummer.

If you use gpg --symmetric without using -r, you can create a file that requires using the passphrase to decrypt it; I don't think any of the various gpg agents will cache symmetric passphrases.

If you want to disable use of a gpg agent entirely, you add the no-use-agent option to your ~/.gnupg/gpg.conf file.

Thanks

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.