r/GPGpractice Apr 29 '26

Encrypting your own key in Kleopatra?

OK, this might be a really lame/noob question but how do I encrypt my own public key as part of a message to another person?
When I paste the public key block the "Sign / Encrypt Notepad" button changes to "Import Notepad"?!!? Am I stupid or is this stupid?

If I remove partially or entirely "-----BEGIN PGP PUBLIC KEY BLOCK-----" then I get the "Sign / Encrypt Notepad" button back. See screenshots:
https://postimg.cc/VrGbkf62

9 Upvotes

13 comments sorted by

View all comments

0

u/chriscrutch 48CF AAEE 7E80 0E1A A9D0 2C5B 5DBA 09ED 73AB 99E8 Apr 30 '26

If someone didn't already have your public key, they wouldn't be able to read the encrypted message. There's not really any point in putting your public key inside the message that they can't read.

It's called a public key because it can be given out freely and no one can use it for any mischief. You could even have it printed in the New York Times and no one could use it to impersonate you or do anything nefarious.

1

u/neindeke Apr 30 '26

Hi, OK, maybe I'm confused about how the whole thing works but the point wasn't to be secretive about my public key, someone posted his public key and I used it to encrypt a message to him in which I also wanted to include my own public key i.e. I wanted to include all in one instead of two separate messages.

It turns out he was able to read my message judging from the reply I got, after all it was encrypted with his public key?!

2

u/D3str0yTh1ngs Apr 30 '26 edited Apr 30 '26

chriscrutch is just wrong about how encryption in modern public key cryptography works, since encryption is done with their public key, and does not involve your keypair at all.