Re: Decryption problem - Large .png file

2014-02-16 Thread Peter Lebbing
On 16/02/14 12:05, Charly Avital wrote:
> The output was gibberish, with bell sounds now and then.

Sounds like the .png file is output to to your terminal instead of a file. This
is the default for the -d option. The -a option is used for specifying armoured
output; it is not used for decryption, AFAIK.

The default action for gpg when given an encrypted file is to decrypt it and
write the result to a file (as opposed to the terminal like with the -d option).
But it constructs the filename for the decrypted file from the filename of the
encrypted file, and the filename you've given is a bit odd. Normally,
something.png.asc would lead to a filename something.png. But with the added
.txt as a third extension, it seems gpg recognises that this is a strange
situation and prompts you what to do. It suggests using the filename of the file
that was encrypted, which is stored inside the encrypted file but not normally
used because it can lead to nasty surprises (you decrypt a file named
harmless.csv.asc and it creates a file named evil.exe). Supposing the original
filename was simply serial.png and the encrypted file is, as you say,
serial.png.asc.txt, this is what it looks like here:

$ gpg serial.png.asc.txt
gpg: encrypted with 2048-bit RSA key, ID 73A33BEE, created 2009-11-12
  "Peter Lebbing "
gpg: serial.png.asc.txt: unknown suffix
Enter new filename [serial.png]:
$

I simply pressed Enter on the "Enter new filename" prompt because I thought the
suggested filename was okay, and I now have a decrypted file serial.png next to
the encrypted one.

If you want to avoid the prompt, you can do either

$ gpg -o serial.png serial.png.asc.txt

or

$ gpg -o serial.png -d serial.png.asc.txt

This is because the default action for an encrypted file is to decrypt it, so
you don't need to explicitly specify -d.

Or you could use a GUI, but since the filename ends in .txt, it might be that
the fact that it is an OpenPGP file is not recognised (by your file manager, for
instance). You could drop the .txt and simply name the file serial.png.asc as 
usual.

HTH,

Peter.

-- 
I use the GNU Privacy Guard (GnuPG) in combination with Enigmail.
You can send me encrypted mail if you want some privacy.
My key is available at 

___
Gnupg-users mailing list
Gnupg-users@gnupg.org
http://lists.gnupg.org/mailman/listinfo/gnupg-users


Decryption problem - Large .png file

2014-02-16 Thread Charly Avital
Hi,

I have received from a friend a very large file in txt. that I have been
so far unable to decrypt:

[serial number].png.asc.txt. Size is 36.1 MB and it is supposed to be
the encryption of a 600 DPI color file.
Sender is running GnuPG v1.4.12 (GNU/Linux).
Because of the size of the file, sender has used Dropbox, and I received
it via my Dropbox.
I have tried to decrypt it using Terminal/CLI, with -d and -a options.
The output was gibberish, with bell sounds now and then.
After typing in Terminal gpg [return], I get the prompt "go ahead and
type your message". I copied/pasted the ASCII text, and at the end I
got: "gpg: CRC error; E9433F - B65688", instead of the expected
information about the keys the file had been encrypted to. Googling CRC
error etc., didn't bring several examples from this list (and others)
but nothing that I could use.
Sender is positive about having used my public key to encrypt the file.

Your help will be greatly appreciated.
Charly
0x15E4F2EA
Mac OS X 10.9.1 (13B42)
MacBook Intel C2Duo 2GHz 13-inch, Aluminum, Late 2008 .
(GnuPG/MacGPG2) 2.0.22 - gpg (GnuPG) 1.4.16
TB 24.2.0 Enigmail version 1.6 (20131006-1849)



___
Gnupg-users mailing list
Gnupg-users@gnupg.org
http://lists.gnupg.org/mailman/listinfo/gnupg-users