The Navigatrix has been updated. The new website can be found at navigatrix.net.




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: PGP Encryption

Joined: 21 May 2013, 14:53
Posts: 93
Hello, NX-ers!

I am using PGP for email with no problem since a while, with the sylpheed client.
I can encrypt a message, and receive encrypted messages this way. My problem is, how do i encrypt and decrypt a TEXT file? Is there a tool in NX or in the software center to encode simple text files?

Thanks for the help.


Top
   
 
 Post subject: Re: PGP Encryption
Site Admin

Joined: 20 Mar 2012, 13:32
Posts: 116
Hi Adrian -

The one method I know of (there're probably more/others), using GnuPG which is also used by Sylpheed for email encryption:

I have a file some_text.txt and my PGP key is tied to my email address [email protected]. To encrypt I open a terminal and type
Code:
gpg --recipient [email protected] --encrypt some_text.txt


This will create a new file some_text.txt.gpg that has been encrypted to my private key (i.e. by using my public key). To decrypt I use
Code:
gpg --decrypt some_text.txt.gpg > some_filename.txt


I will be asked for the pass phrase for my private key and the decrypted text (which by default goes to stdout/the screen) will be redirected redirected to the file some_filename.txt.

Note that only you/your private key will be able to decrypt the encrypted file. If you want to encrypt the file for someone else you will have to use their public key for encryption (by specifying their email address with --recipient option and having imported their public key from a key server or some source). You can also encrypt to multiple recipients (for example, if you want to encrypt for someone else but want yourself be able to decrypt the file again).

NX comes with "Seahorse", an application to manage different public keys on your keyring (Manta -> Accessories -> PGO Encryption Keys)


Top
   
 
 Post subject: Re: PGP Encryption

Joined: 21 May 2013, 14:53
Posts: 93
Hello!

Thank you for the reply!
my problem is that the key from the sender has a made-up email address attached to it, so pgp won`t recognize it.


Top
   
 
 Post subject: Re: PGP Encryption
Site Admin

Joined: 20 Mar 2012, 13:32
Posts: 116
Quote:
my problem is that the key from the sender has a made-up email address attached to it, so pgp won`t recognize it.

I'm not sure I understand the 'use case'. It sounds like you received an encrypted text file from someone else. However, this file was not encrypted *to* your private key (by using your public key) but rather the sender encrypted it *with* his/her private key, to be decrypted with his/her public key (typically this method is only used for digitally signing documents, as anyone with access to the sender's public key will beable to decrypt it).

if this s the case, how/in what format did you receive the sender's public key (e.g. as a text file/string attached to an email)? There are multiple ways to tell GPG which key to use (email address, name, key ID). If the key is already on your 'keyring' you can show its ID by typing
Code:
gpg --list-keys

in a terminal window (or use Manta Menu -> Accessories -> PGP Encryption Keys).


Top
   
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 


Search for:

Credits © 2010 - 2024