I encrypted a message by:

  1. Typing gpg --encrypt --armor --recipient [recipient]
  2. Hitting enter
  3. Typing the message to be encrypted
  4. Exiting/finishing with "ctrl + d"

However, I needed to press "ctrl + d" twice, for some reason. Maybe a Termux bug? Although I haven't tried it on a normal Linux distro, so maybe this is normal?

Question: if it isn't normal, did gpg encode/include the first "ctrld" in the encrypted message? If it did, I need to contact the recipient to tell them to disregard the message... ๐Ÿคฃ

Naturally, I cannot reverse the message since it's encrypted with the recipient's public key.

all 8 comments

sorted by: hot top controversial new old
[โ€“] 8 points 5 months ago* (5 children)

You need two if the message doesn't end with a newline AFAIK. This is the case for several tools that operate on stdin, but I'm unsure if it is a program thing or a bash thing.

Sidenote, you can add yourself as a recipient too to be able to decrypt messages you send. I don't think it violates any principles or etiquette, and you can/should use --throw-keyids anyway

  • source
  • hideshow 5 child comments
  • [โ€“] [S] 3 points 5 months ago (4 children)

    Thanks! I (kind of) came to the same conclusion after finding and reading this.

  • source
  • parent
  • hideshow 4 child comments
  • [โ€“] [S] 2 points 5 months ago (3 children)

    Sorry for spamming. I just tried encrypting it with my own credentials as recipient. Worked like a charm. Thank you so much! :D

    By the way, is --throw-keyidsa countermeasure against man in the middle attacks? Does it assume that the recipient's private key has been compromised?

  • source
  • parent
  • hideshow 3 child comments
  • [โ€“] 4 points 5 months ago* (2 children)

    It doesn't improve any guarantees, it's strictly an opsec practice. By default you can publicly view the fingerprint of the public key(s) of the recipient(s) to aid in selecting the correct key for decryption, while --throw-keyids removes that metadata. Don't use it if you want to demonstrate that the message is not additionally encrypted to other keys, i.e. the conversation is confidential. Use it if you don't want a MitM to know who you're talking with.

  • source
  • parent
  • hideshow 2 child comments
  • [โ€“] 2 points 5 months ago (1 child)

    I think I've seen this with patch too, when pasting a diff into stdin.

    I think its normal.

  • source
  • hideshow 1 child comment