Yesterday and today combined I spent about 8 hours trying to get my PGP / GPG passphrase to work. Absolutely magically, somehow a newline character had gotten into the passphrase. Yes. That's possible. On macOS, that is.

On my Windows machine I have the same fucking private key protected with the same password. Now try and get a non-windows newline character into any Windows password field, be it a command line or some GUI input. WTF! You'll lose a year of your life with every passphrase error while you have the actual passphrase.

So after all these hours trying to hack my own GPG keystore without success, I remembered how the private key got on my Windows machine in the first place: see tags.

  • 0
    Mac used to be just \r) carriage return no newline \n)
    Reminds how stupid (I understand the purpose /audience) is the newline and extra space office add when you copy 😭
  • 1
    Oh, and I fixed the passphrase on my macOS machine and then did the export-import.
  • 1
    And who the fuck knew that some password fields could accept a newline character. How awesome is that?

    Your password could be:
  • 0
    And that is quite interesting. Probably tabs or any other character too.
    Try bell (beep code \007 if I recall correctly 😊
Add Comment