copied files can't be decrypted
I am trying to use GPG to encrypt files to attach to email, not
to encrypt the emails themselves.
I have installed GPG on a MacBook Air, Lion, 10.7.2
I created my key, no problem.
If I write a file in Text edit & save it in .rtf. I can then
right click the file and choose to encrypted it using
“services”.
If I encrypt it with my own key, I can then decrypt that same
file again with my own key.
But it does not seem to work when I try to encrypt a copied
file.
If I try to copy it to another empty text edit .rtf document, it will no longer decrypt. Instead I get a message, “no decryptable data found”.
Also, when I go back and look at the encrypted message in text edit it is garbage, not the usual neat encrytped file with -----BEGIN PGP MESSAGE ------ and ------END PGP MESSAGE------ around it that I expect from a PGP encrypted document.
Furthermore when I try to decrypt an encrypted file sent by a friend, I get a message, “no decryptable data found” even though it does look correct in text edit.
Can anyone tell me what is going on?
I am attaching such a file, encrypted with the PGP public key, then
copied to another TextEdit document. It says "here is a
message".
Comments are currently closed for this discussion. You can start a new one.
Keyboard shortcuts
Generic
? | Show this help |
---|---|
ESC | Blurs the current field |
Comment Form
r | Focus the comment reply box |
---|---|
^ + ↩ | Submit the comment |
You can use Command ⌘
instead of Control ^
on Mac
Support Staff 1 Posted by Steve on 28 Jan, 2012 08:39 PM
Hey Q,
I'm not sure I already understand what you are trying to do. The Original_encrypted file doesn't help a lot since I can't encrypt it.
And the encrypted message does not look ok. Encrypted messages should look similar to this here:
-----BEGIN PGP MESSAGE-----
SF58k7YrgWYOYn9gGPPKbg4CgfwEfQkIecKUTiFJtru3/L29ovqPdTEgCHQAhp4x+sq76KEhE8uWgW4RMcZrdLEh3xBijinM6n6amzyLm7H+YAlpzC1orlB8W9r53dUQOjPd/6h6cOhxo4waEj2xnsHAPW9z24tpRBZP+L0c/4/w44Ev4+LUJkUe+Wgj6Ibf8/Vd9Ey7wpd1Py5jRxxxnHrbLl88CL5ppW4G/Af/S0eepx4mswDX4rUG2XR27dGVQRupQpQCfg0atJgNm/62Qlk6uxejQJUchjt8X4dweEP2yRwOECkMqMXz6F4ged6Y2Bwq5JIASjsH4bNCxRkeRv0vkKNSWHVR5lXtHRrtLj/44Tec1W/RD7uf3fJoeUaVk3oVQcfvt0VUkB8C7KEEBugWlgkTCilwt8+4QUQB8e4mfvfYgv2v1L0WFtbW80II1QrjFhLvUpw/39O7Rc3hEcZwgYmHOQV5jAlKhRwAfeylTt8HGQTGvtgi24fa0kABtwtjfi0MgTOrH9QUNGBurAcIpE17Yy7YRVNyIPmsX4/jLmri62QY8Qa9aOmKo6zQGgSCmdzH5Jbh5AMrtjQc
=igD0 -----END PGP MESSAGE-----
So since the message looks already broken, maybe that's the reason why GPGServices thinks there is nothing to decrypt. It doesn't even know where the PGP Message is starting, since that info is missing.
As for the file you have received: Are you sure he used your public key to encrypt the message? Otherwise you won't be able to decrypt it.
Maybe do some more testing and provide more details. Also feel free to send a testmail to me (find my key in the key server: steve AT gpgtool DOT org
2 Posted by D. Q. on 30 Jan, 2012 08:27 PM
Hello Steve:
You are right, it doesn’t look right.
Please let me take you step by step.
1st I open Textedit and write a message. The message says, “This is a message.”
I then save the TextEdit document as a plain text file. (Test GPG Message.txt) (rtf doesn’t work)
Then I go to the finder and I right click on that file and choose “Encrypt”. I choose someones public key. In the example below I have choosen the GPG Tools Project key.
That creates a file "Test GPG Message.txt.gpg"
Then I open the Encrypted file with TextEdit and it looks like this:
Ö
͉ö€ÀÊq
äBæ
ªÓ¶y˙x‡µ9¶Æª¸‡\Ã˙
Üá≠?
3◊;u^Ôpj‡…é1Y{îaùN,p3Êî÷Í!™
x;π√
â∞´8…9Äœ¸—˙TÒ7[5í¯Å€Æèœü’
IØlLªŸÖ¶¯Œ_`I†∑ê≠‚˘¯€cmÁQ}£flT©`–}”ˆT*oöœ‡âæ2≥tÊ¢h∫Ωk§ã`÷~∏ö
3∑,eQ¶s∂Ǩ†;O~´ÕK^ŸLÄ‹åTs4é˛¯–Ω”>ò3åÒœfl4Q†îB√`Óhı9∂·òÚK’|§Épz®˛?ènµ7(”
ßøÑ|Ù◊÷n\‹›˙-ÖS üâÅ&…_.`´;
ˇ`>K0B)°94}Ö€D¢ˆ˚“a∞4™˛„‡Èí8rh„Òµk&•ø©BÁ
Èo
Ӂ/
≥Ë·„ç:[ù´Ê)”;êbƒÌœˆÜêüYÖP¶ÏS©!0&pé÷Ä)]ø^Ïå7O\
3äx@USq˘AÅ
—æaÛ„À˝ÔE9îöÛt
U®O.Sߧu´
û!Qp""ß(L˛˘´«~UM?N«ÖÛXY(°“DR≤∆óWuò…~5‘!»{fl›Œ>¨8PS
@8¿sZî^
YY„∏ù˚=©-Ä›Ñ≤4(ˇßN1%®ßÙ«√‰¬'/A%E“ßk±†E (úÔ@¿R7_Õ
ì≤Ö
í3Ùó,V≈›¬«ûá"}»yftπ_XñÓfiI±äÛìd˜˛C’f
∑yùüÃT˙ê_€†cIªãsªfiD≠ˇS-
h\ºu
‚á˛+⁄y
˛ãˆ)Ä’‘çsR∫¡û&èG˙˛°Í~”Í¡%7€„|}
√Dß
’å
3|LKOõJ^Ü3B72K´v
°fl5»{ÜC›Z9ÊZƒíÛˆ%{GÃéPQ]l˛ˆ•õϨ”-yºaSÉó^çÎ\Ã&/0iØ%εX∆W{ƒèÍfi7‰D´Eë◊‘Øfˆ‹œæƒ°’jkIm/<ù$¿-ôå—q{,≥0∂˜-Vˇ«z±óflÇ“¿
{»»mi—nJˆ3ε`U·Ä¡ÿ¬◊F1ãsAzd‹VQÇ$¬ÜÓ
C©lÄaa¥>≠üˇ¨á”
∑
ÛX≤µ
>.⁄¯ø<ıò™)RÜ1óÙí)Ë$Ø
M;%≠Á°rî9ï0:$
@7@Ê∑F‘-·≈“ܺ®8°t@áÃ≥-I6Ô”ót4∫cõ%PÌp(á›ü^3EUŸ∑pάHaëa⁄,qr≈¢Ê"D¥ıÀ±Ñ
∑,º=R\¬ßtâ-H'NáÚ[*N˜±ñ
Something is wrong. It doesn’t look right.
Curiously however, If I make a similar message and have added my key, and I right click and decrypt the file, it is readable. Also if I encrypt a file with a friends public key and send it as an attachment he can read it. But if I try to open the encrypted file in TextEdit it looks like the garbage above and cannot be copied back to a Text edit document and decrypted or pasted in the body of an email. (Like you say there is not BEGIN and END)
I would like to send you the file encrypted with your public key, but I do not know how to find it. I do not understand what you mean by, “(find my key in the key server: steve AT gpgtool DOT org”
I assume you mean with the AT changed to an @ and the DOT to a “.”, but if I try to search the keyserver for that (using GPG Keychain Access, under “Key” then “Search for key” it says “no key found”.
Anyway, I am attaching the above message in encrypted form,encryped with the GPG Tools Project key so you can test to see if you can read it in that form when it is an attachment.
Any advice would be appreciated.
Q
Support Staff 3 Posted by Luke Le on 30 Jan, 2012 09:57 PM
Hi Q,
What you're seeing once The message was encrypted
is a binary presentation of the encrypted message.
The ASCII Version with BEGIN PGP MESSAGE is simply the binary
encoded using base64, which translates the binary into ASCII.
If you right click on the file you should be able to decrypt using
the OpenPGP: Decrypt
4 Posted by D. Q. on 31 Jan, 2012 07:54 AM
Hello Luke:
OK, That makes sense, I am looking at the Binary not the ASCii.
And I can decrypt it with my key and send the encrypted file as an attachment for someone else to decrypt if it is encrypted with his public key.
But why can’t I cut and paste it into another blank text document and then decrypt that document. In other words put it into the body of an email for someone else to copy out into another .txt document and then decrypt.
If I try to cut and paste the encryped binary data, it can no longer be decrypted. I just get a message, “no encrypted data found”.
Let me explain where I am coming from and why this has become an issue for me. In the past I used the old PGP and was able to write a document in any word processor, copy it to the clipboard, and choose “encrypt clipboard”, then paste the clipboard into any email or other document. The pasted and encrypted text was in Ascii with the BEGIN & END message and could be decrypted.
It was very convenient.
I can’t do that do that with this version of GPG. Maybe this is a Mac problem, because I am told that under Windows, PGP has a program called Kleopatra? that may be able to do this. But I see no way to do it on the Mac as there is no visible ‘program’ for PGP, it is just built into the services and I see nothing like "decrypt clipboard".
Is there something I am missing? Is there some convenient way to encrypt the clipboard and move the encrypted text around?
Q.
5 Posted by Alex on 28 Feb, 2012 08:25 PM
This takes a bit too long to explain.
No. It's just that GPG can create binary and ascii files. You're working now with a binary file (who has created it?) that you can't copy & paste using a text editor. All files that GPGTools is creating are ascii files.
6 Posted by cfraire on 29 Feb, 2012 12:41 AM
I confirmed D.Q.'s problem. The default gpg.conf which is created by GPGTools does not include the "armor" switch, and GPGServices>OpenPGP Encrypt created a binary encrypted file.
When I added "armor" as a line to my ~/.gnupg/gpg.conf, GPGServices then created an ASCII armored file.
D.Q., for now, you can add a switch as I did. A future update of GPGPreferences can manage this switch.
Support Staff 7 Posted by Steve on 29 Feb, 2012 11:48 AM
@all We now have a ticket for this problem. Feel free to subscribe to http://gpgtools.lighthouseapp.com/projects/66966-gpgpreferences/tic... if you want to be notified of changes made in regards to this issue.
Thanks c. faire for your help. It is very welcome. :)
All the best, steve
Steve closed this discussion on 29 Feb, 2012 11:48 AM.
Steve closed this discussion on 08 May, 2013 09:44 AM.