#146 ✓released
Dylan Johnson

Everything doubling when encrypting/decrypting

Reported by Dylan Johnson | September 30th, 2012 @ 06:19 AM | in 1.8 (closed)

Hi, I am having a problem when I encrypt messages in text edit.
When I encrypt, it encrypts the message in two different pgp blocks, and prints the message twice in each pgp block.

Here is an example of what I am talking about:

Original Message:

Protected Message

Message Encrypted:
-----BEGIN PGP MESSAGE-----

hQEMA2csyHDwjAq0AQgAyY5Y1FQ98D9hgko8QOXCD+ES2BXcdyOJYtfR+s5Gzwy1
wdLWogjJ8Cxip8+OIsUT6vWdw4hV/ymS95QTf5CPQgJfX2d8lOidnViwwmOXyBQj
ei6dSrF1UKhBjF3LYRTX11j6FtQyffD9l1Cwibncd03T4EF5mkTW+Zx4HM9rC2Tx
l/qTH7NEKcSMg6Cj/70SfiFgrIbzphoFLsZk5pwBKHkOv67In6Wb9ZsR+qO0l0pG
eNb3AeLU+97ZRB/lccsSgDAaLYtbI+q06tCjpt08RZQvL+R+Vt1rNiB3SMUQFqJt
yAFF4DrqbHG1GHcvHDP7ZM0GXCTE2TWeaqmo+wyNzdLAvgHSNu3Na6+FkUb5zgmW
FnaZgn1QE1aMDDh/csOPCs/nV1wALT0SPkDPM4N+kBsUcGdW3MJJ17VTWzsqRjvY
QrZAwGxEMROyzJO5tfIRa1VT+7XOhmoc3h8SJRrjjCFMY/2lJo6DqEAkY33Xy4ug
IWL7+/b0YpW+plwLA/zuieDAJ2aY35AMZRXBslOK2twx0S2YcxfQXEvyMI0+/k+z
+pV8SwHWJtHy+gPygiV02frtLBr6i4fW8MzocacW0edWVoH6003+jAAB5zpnC+nQ piUe2FgyWOMErvvNHp5/HzJQV/ZdL9bMpShE2Kwhl5TRsinMPMmkjCi/NWchBb3s
I8GJaxoC+m6fDAKqbW24wBz/NxtiKgpVRhrFrjQnupf9BWtC16Ej2INrPdA4Ax+r
o7X2GnjfwhuYJBeC8aWZkHeQWSSogZWW1PRmXIuvevIVc11oNGSRgzE6rE1qCZk5
yL8YbOlhxGpwU8ZdM9lwLA/cGVp8U4oTlCtOfrg6TS4=
=+qbF -----END PGP MESSAGE-----

-----BEGIN PGP MESSAGE-----

hQEMA2csyHDwjAq0AQgAyY5Y1FQ98D9hgko8QOXCD+ES2BXcdyOJYtfR+s5Gzwy1
wdLWogjJ8Cxip8+OIsUT6vWdw4hV/ymS95QTf5CPQgJfX2d8lOidnViwwmOXyBQj
ei6dSrF1UKhBjF3LYRTX11j6FtQyffD9l1Cwibncd03T4EF5mkTW+Zx4HM9rC2Tx
l/qTH7NEKcSMg6Cj/70SfiFgrIbzphoFLsZk5pwBKHkOv67In6Wb9ZsR+qO0l0pG
eNb3AeLU+97ZRB/lccsSgDAaLYtbI+q06tCjpt08RZQvL+R+Vt1rNiB3SMUQFqJt
yAFF4DrqbHG1GHcvHDP7ZM0GXCTE2TWeaqmo+wyNzdLAvgHSNu3Na6+FkUb5zgmW
FnaZgn1QE1aMDDh/csOPCs/nV1wALT0SPkDPM4N+kBsUcGdW3MJJ17VTWzsqRjvY
QrZAwGxEMROyzJO5tfIRa1VT+7XOhmoc3h8SJRrjjCFMY/2lJo6DqEAkY33Xy4ug
IWL7+/b0YpW+plwLA/zuieDAJ2aY35AMZRXBslOK2twx0S2YcxfQXEvyMI0+/k+z
+pV8SwHWJtHy+gPygiV02frtLBr6i4fW8MzocacW0edWVoH6003+jAAB5zpnC+nQ piUe2FgyWOMErvvNHp5/HzJQV/ZdL9bMpShE2Kwhl5TRsinMPMmkjCi/NWchBb3s
I8GJaxoC+m6fDAKqbW24wBz/NxtiKgpVRhrFrjQnupf9BWtC16Ej2INrPdA4Ax+r
o7X2GnjfwhuYJBeC8aWZkHeQWSSogZWW1PRmXIuvevIVc11oNGSRgzE6rE1qCZk5
yL8YbOlhxGpwU8ZdM9lwLA/cGVp8U4oTlCtOfrg6TS4=
=+qbF -----END PGP MESSAGE-----

Message after both PGP blocks being decrypted:
Protected Message
Protected Message
Protected Message
Protected Message

So, I end up with the message printed out 4 times!
What is going on here?! I've been trying to figure this out for a while now.
I had this problem before, then it was fixed and I hadn't used PGP for a while.
Then I updated to the new Mac OS X Mountain Lion and I am having this problem again. (I'm not sure if it was related to the updating my OS, or downloading the new GPGTools installer)

Thanks!

Comments and changes to this ticket

  • Dylan Johnson

    Dylan Johnson September 30th, 2012 @ 06:53 AM

    Oh sorry here are my system specs:

    Macbook
    13-inch, Mid 2010
    Mac OS X Mountain Lion
    Software OS X 10.8.2 (12C54)
    Processor 2.4 GHz Intel Core 2 Duo
    Memory 2 GB 1067 MHz DDR3
    Graphics NVIDIA GeForce 320M 256 MB

    GPGTools
    GPG Keychain Access: Version 1.0b7
    Installer: GPGTools-20120318

  • Luke Le

    Luke Le September 30th, 2012 @ 06:54 AM

    Hi Dylan,

    have you tried to install GPGServices from https://nightly.gpgtools.org ?
    It's the most stable version and should no longer have this problem.

    Let us know if it works.

  • Dylan Johnson

    Dylan Johnson September 30th, 2012 @ 06:58 AM

    Hi Luke Le,
    I forgot to mention, I tried the latest nightly and I got a different error I think it was something about not finding pinentry? or no pinentry installed? or something like that, I could install it again and get the specific error if you need it.

    Thanks!

  • Luke Le

    Luke Le September 30th, 2012 @ 06:59 AM

    Best is, install GPGTools from nightly and after that GPGServices from nightly.
    It would be great if you could attach a screenshot of the error.

    Thanks!

  • Dylan Johnson

    Dylan Johnson September 30th, 2012 @ 07:00 AM

    Thanks I will do that now.

  • Dylan Johnson

    Dylan Johnson September 30th, 2012 @ 07:09 AM

    Here's a screenshot of the error,
    I'm downloading the GPGServices from nightly builds now.

  • Dylan Johnson

    Dylan Johnson September 30th, 2012 @ 07:18 AM

    Ok I downloaded and installed both the nightly installer and services and even tried the "fix GPG tools" in the preferences and i'm still getting the pinentry error

  • Luke Le

    Luke Le September 30th, 2012 @ 07:23 AM

    That's pretty strange.

    Are you familiar with the Terminal?
    Please run the following command for me:

    cat ~/.gnupg/gpg-agent.conf

  • Dylan Johnson

    Dylan Johnson September 30th, 2012 @ 07:39 AM

    Here are the results:

    pinentry-program /Library/Services/GPGServices.service/Contents/Frameworks/Libmacgpg.framework/Resources/pinentry-mac.app/Contents/MacOS/pinentry-mac
    default-cache-ttl 600
    max-cache-ttl 7200

  • Dylan Johnson

    Dylan Johnson September 30th, 2012 @ 07:41 AM

    Oops here are the full results:
    dylans-macbook:~ dylanjohnson$ #pinentry-program /Library/Services/GPGServices.service/Contents/Frameworks/Libmacgpg.framework/Resources/pinentry-mac.app/Contents/MacOS/pinentry-mac
    dylans-macbook:~ dylanjohnson$ default-cache-ttl 600
    -bash: default-cache-ttl: command not found dylans-macbook:~ dylanjohnson$ max-cache-ttl 7200
    -bash: max-cache-ttl: command not found dylans-macbook:~ dylanjohnson$

  • Luke Le

    Luke Le September 30th, 2012 @ 07:42 AM

    Now this is getting strange.
    Could you please check if this file exists:
    /Library/Services/GPGServices.service/Contents/Frameworks/Libmacgpg.framework/Resources/pinentry-mac.app/Contents/MacOS/pinentry-mac

    and check your Console.app for any gpg errors by searching for the string gpg

  • Dylan Johnson

    Dylan Johnson September 30th, 2012 @ 07:42 AM

    Actually I think the first one is correct, sorry!!

  • Dylan Johnson

    Dylan Johnson September 30th, 2012 @ 07:48 AM

    That file is there.
    Attached is all the gpg errors in the console

  • Dylan Johnson

    Dylan Johnson September 30th, 2012 @ 07:52 AM

    ok I cleared and here are the errors that occur from trying to decrypt a pgp block

  • Dylan Johnson

    Dylan Johnson September 30th, 2012 @ 07:54 AM

    after further experimenting it seems like I can now encrypt a text sequence, if I do not sign the encryption... But then I get the pinentry from trying to decrypt... and it doesn't ever ask my for my password...

  • Luke Le

    Luke Le September 30th, 2012 @ 07:55 AM

    Hmmm... ok, the error is with connecting to the gpg-agent it seems, that's why you can't
    sign or decrypt files/messages.
    Could you try to install the MacGPG2 package from https://nightly.gpgtools.org
    I really hope this fixes it now, otherwise I could only propose you to try a remote session if you'd be willing
    to do that.

  • Dylan Johnson

    Dylan Johnson September 30th, 2012 @ 07:57 AM

    ok so now I deleted my key to try and create a new key and i get the No pinentry code = 85 when trying to create a new code...

  • Dylan Johnson

    Dylan Johnson September 30th, 2012 @ 07:57 AM

    ok I will try this thanks for all your help and time I really appreciate it!!

  • Dylan Johnson

    Dylan Johnson September 30th, 2012 @ 08:00 AM

    downloaded and installed, same error when attempting to create new key. would a restart of my computer make a difference?

  • Luke Le

    Luke Le September 30th, 2012 @ 08:02 AM

    that might very well help!
    Going to bed now, it's already 8am here :D
    I'll check back later today. We're gonna get this sorted, no worries :)

  • Dylan Johnson

    Dylan Johnson September 30th, 2012 @ 08:03 AM

    Alrighty get some sleep brother!! Thanks so much i'll chat with ya tomorrow :D

  • steve

    steve September 30th, 2012 @ 01:42 PM

    • State changed from “new” to “invalid”

    Dylan, can you please open a discussion on our support platform? http://support.gpgtools.org/

    This here is our ticket system where we manage the bugs once we've found and isolated them. Please, when starting a new discussion, include a link to this ticket here so we can track the history of this problem. Also, please report if a restart did indeed help to get this sorted.

    Hope we can get you fixed soon :)

    Best,
    steve

  • Luke Le

    Luke Le October 1st, 2012 @ 02:24 AM

    • State changed from “invalid” to “open”

    Hi Dylan,

    just checked your screenshot again.
    Any chance you're trying to use GPGServices within the Tor Browser? (I think you have the Tor Browser Bundle installed)

  • Dylan Johnson

    Dylan Johnson October 1st, 2012 @ 08:11 PM

    Hi Luke Le,
    Although I do have tor browser installed, I only try to encrypt within textedit.
    I still get the pinentry error when just trying to create a key from GPGKeychainAccess
    Thanks for continuing on this I thought it was a dead case lol

  • Luke Le

    Luke Le October 1st, 2012 @ 09:09 PM

    Hi Dylan.

    I just found the problem.
    To fix it, please edit your ~/.gnupg/gpg-agent.conf and remove the first '#' character
    before pinentry-program

    Save and you should be fine again.

    (it's a bug in our install scripts apparently)

    Let me know if it works, please :)

  • steve

    steve October 1st, 2012 @ 10:25 PM

    • State changed from “open” to “waiting”
  • steve

    steve October 1st, 2012 @ 10:25 PM

    • Assigned user set to “Luke Le”
    • Importance changed from “” to “Medium”
  • Dylan Johnson

    Dylan Johnson October 1st, 2012 @ 10:29 PM

    I feel like an idiot but I cannot find ~/.gnupg/gpg-agent.conf...
    :/

  • Dylan Johnson
  • Dylan Johnson

    Dylan Johnson October 1st, 2012 @ 10:38 PM

    So updated and still get this error....
    Generate new key failed! (No pinentry)
    Code = 85

    Error text:
    gpg: problem with the agent: No pinentry
    gpg: /dev/fd/5:0: key generation canceled

  • Dylan Johnson

    Dylan Johnson October 1st, 2012 @ 10:41 PM

    Here's what file looks like now...

    pinentry-program /Library/Services/GPGServices.service/Contents/Frameworks/Libmacgpg.framework/Resources/pinentry-mac.app/Contents/MacOS/pinentry-mac
    default-cache-ttl 600
    max-cache-ttl 7200

  • Dylan Johnson

    Dylan Johnson October 2nd, 2012 @ 06:45 AM

    Ok so after restarting my computer, this fix works!!!
    I'm so excited finally!
    Thanks so much Luke Le!

  • Luke Le

    Luke Le October 2nd, 2012 @ 06:49 AM

    • State changed from “waiting” to “released”

    You're very welcome. I forgot that you probably have to logout/login or rather kill gpg-agent.
    Very glad this is solved.
    I've also fixed the bug which caused this in the first place in our installer.

  • Dylan Johnson

    Dylan Johnson October 3rd, 2012 @ 01:02 AM

    Awesome. You're the best!
    All your time and effort is really appreciated.
    Glad I could help bring attention to the bug as well!

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

Shared Ticket Bins

Pages