1

Does anyone know why in some cases you can do this:

gpg2 -d

And paste your GPG message into the terminal, type ctrl+D, get prompted for your passphrase and get the results to STDOUT? But in other cases, when you paste the message after running the above command, the passphrase entry prompt comes up immediately with a partially filled in password (which will be wrong so you hit enter and re-enter the correct passphrase). After this, you can type ctrl +D and it will decrypt the message?

1 Answer 1

0

One reason might be that the contents contain the ASCII character 4, which is equivalent to ctrl-d ("EOT end of transmission"); followed by any additional input: this is the same as you pasting the encrypted data, pressing ctrl-d and typing some final garbage.

You could use a hex editor to analyze the input. If you find a character (byte) 04, then you spotted the problem.

1
  • Good thought but on at least one of them that is not the case, no hex 04 in the message.
    – jshort
    Mar 5, 2015 at 4:16

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .