pgp-tray or something alike : get started with pgp (again)

For interesting topics. But remember this is a Linux Forum. Do not post offensive topics that are meant to cause trouble with other members or are derogatory towards people of different genders, race, color, minors (this includes nudity and sex), politics or religion. Let's try to keep peace among the community and for visitors.

No spam on this or any other forums please! If you post advertisements on these forums, your account may be deleted.

Do not copy and paste entire or even up to half of someone else's words or articles into posts. Post only a few sentences or a paragraph and make sure to include a link back to original words or article. Otherwise it's copyright infringement.

You can talk about other distros here, but no MX bashing. You can email the developers of MX if you just want to say you dislike or hate MX.
Message
Author
p1e
Posts: 132
Joined: Fri Apr 01, 2022 6:01 pm

pgp-tray or something alike : get started with pgp (again)

#1 Post by p1e »

hello and good morning dear MX-Friends, :happy:

first of all - i hope youre fine today - and everything goes all right at your site.

today i have a special topi: the question is: how to decrypt a pgp based messag !?

first of all: used pgp years ago .- long time not any more.

but HAVE KEYS AND all that sort of things on my linux box - two days ago my friend send me a messsage that is necrypted: now i need to read the message.
do you suggest to use a so called pgp-tray to read the message -(/wheras i can import the keys etc.)

Hmm - well i really hope that i have been able to spell out what i need - and what is the case here
look forward to hear from you

best regards
yours p1e :happy:


update: some thougths that you might understand my situation a bit better: i received an encrypted PGP message, and i still have some old keys on the Linux machine, but it’s been a while since i last used PGP. In other words i just basically want the simplest, safest way to decrypt and read the message.

what can be a good approach: i think that there are some methods, options ways here /(at least they come up to my thoughts):


a.Decrypt the message

note my friend sent me a file, say message.asc, i can decrypt it with:

Code: Select all

gpg --decrypt message.asc
GPG will ask me for the passphrase of the private key. After entering it, the plaintext message will appear.

but duuuhh - what if i do not know the passphrase right now - it i cant remember it - [shhhhhit :turtle: :confused: ]


b. Optional – PGP Tray or GUI tools

in earlier times i d prefered something with a graphical interface rather than the command line:

Seahorse (GNOME key manager, integrates with GPG)
PGP Tray (less common nowadays, but can still work) - i used it on the win-machines.

well - these tools let us manage keys and decrypt messages through a tray icon or context menus. But hmmm - for a one-time read, gpg --decrypt is the most straightforward.


update: .. - well since i did not find the keys i need to do some extra work - i need to generate a new set of keys..:


in fact: i did not find the keys - so i have to start over: since the old private key is missing, i guess that the cleanest approach would here to generate a brand-new keypair, and that sai - to keep the private key safe, and afterwards - to send to my friends the public key so they can re-encrypt messages to me - and we can exchange messages in the future.


in case any other user here has the same issues - i write down the steps in the process to generate the new key: - so this might be (hopefully) helpful to others too:

here we have the process: for the process if we are on Linux the recommended way would be - hmm:

we have to firstly do the important step:

1. Install GnuPG (if not already this exists)

we ought to check with the following command:

Code: Select all

gpg --version

Well and now it goes - if it?s missing, then we need to install the stuff (and if we are on EOS - an Arch based Linux then it might be like so):

Code: Select all

sudo pacman -S gnupg

and then - if the stuff is installed - we could go further and
2. Generate a new key

here we need to run:

Code: Select all

gpg --full-generate-key

and it goes further: here - in that place we are asked a few things:


Key type: just press Enter for the default (RSA and RSA).
Key size: choose 4096 bits (strong, standard today).
Expiration: either set an expiry (e.g., 2y) or choose "0" for never. Expiry is good for security.
Name + Email: enter something meaningful so our friend can recognize you.

Comment: optional - this is not totally necessary - i leave it open ... you can do it like me ;)

Passphrase: hmm - i think it is important to choose a strong passphrase ? this protects our private key.

3. List our new key

After generation, check:

Code: Select all

gpg --list-keys

we ?ll see an entry with our name/email.

4. and now - here in this step we are able to export our public key (to send to our friend)

To export and save it as a file:

Code: Select all

gpg --armor --export your@email.com > mykey.pub

note; the so called --armor makes it to a ASCII text so we can email or paste it safely.


on and on it goes: in the next step - we are able to

5. Send the public key

now we can send mykey.pub to our friends (email, messenger, whatever).
⚠️ Never send the private key ? only the .pub.


6. (Optional but smart) Backup our private key

Export our private key and store it securely (offline, encrypted USB, etc.):

gpg --armor --export-secret-keys our@email.com > mykey-private.asc


I hope the pgp-things might help others too :wave:

- greetings p1e :happy:

i am very very glad to be here in the forum - its a great place for idea exchange and learning I am so glad: Keep up the great place. It rocks :happy:



additional: well i wrote this down here - to share it wiht all of you - i hope that it might be helpful for others too. For me its helpful to write down the things. It helps me to make things clearer..
and yes: for me its like in the Kleist's Text and the "Formation of Thoughts"In his essay On the Gradual Formation of Thoughts in Speaking (1805/06), Heinrich von Kleist describes the experience that thoughts do not first arise as "finished" in the mind and then are merely formulated. Rather, they emerge in the act of speaking itself. This means: Speaking is not only an expression but also a production process of thoughts. so i think that language and writing are just tools, not just means of transporting thoughts. :turtle: :happy:
p1e: interests: Linux & SBC All About Circuits - Electrical Engineering & Electronics:
https://www.allaboutcircuits.com :: new Knowledge-Base: AFFiNE: There can be more than Notion and Miro. on affine.pro :: WordPress: make.wordpress.org/core/

Return to “General”