LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   GPGP for Linux (https://www.linuxquestions.org/questions/linux-software-2/gpgp-for-linux-473425/)

HappyTux 08-17-2006 12:39 PM

Quote:

Originally Posted by Gins
Happy Tux

Let us say the name of the file that I want to send is ' test1 '

I believe the following command will encrypt that file

[root@c83-250-110-112 nissanka]# gpg -e -r scormier@gmx.net test1

The above will create a file with a .gpg ending. I will send it to you.

Please tell me if I am wrong.

Yes that will work so that only I will be able to decrypt the test1.gpg when I get it.

Gins 08-17-2006 02:26 PM

Thank you again Happy Tux for taking time to reply me. It is a yeomen effort from you to help me. I will send a message either this Saturday or Sunday.

I am very tired now. I came home from an hour ago. After work, I went to the gym. I am training 3 times a week. The work and training took all my energy. I must sleep soon instead of working with the computer.

By the way, my kmail works fine.

Gins 08-19-2006 11:05 AM

I am very surprised by the fact that my public key has not spread to all the servers. I submitted to the following server:
http://pgp.mit.edu/
It is there when I searched.


The following server says it is not there. What would be the problem?
http://keyserver.veridis.com

HappyTux 08-19-2006 12:17 PM

Quote:

Originally Posted by Gins
I am very surprised by the fact that my public key has not spread to all the servers. I submitted to the following server:
http://pgp.mit.edu/
It is there when I searched.


The following server says it is not there. What would be the problem?
http://keyserver.veridis.com

That I really have no idea about as to when/how the keyservers get updated or even if the veridis.com is part of the network.

Gins 08-19-2006 01:35 PM

Thanks Happy Tux for the reply.
Do you know any other servers apart from keyserver.verdis which keep public keys?

Please check your mail.

HappyTux 08-19-2006 02:07 PM

Quote:

Originally Posted by Gins
Thanks Happy Tux for the reply.
Do you know any other servers apart from keyserver.verdis which keep public keys?

Please check your mail.

According to the man page all keyservers are supposed to they list a command to find others.

Code:

--keyserver name
Use name to lookup keys which are not yet in your keyring. This is only done while verifying messages with
 signatures. The option is also required for the command --send-keys to specify the keyserver to where the keys should
 be send. All keyservers synchronize with each other - so there is no need to send keys to more than one server. Using
 the command "host -l pgp.net | grep wwwkeys" gives you a list of keyservers. Because there is load balancing using
 round-robin DNS you may notice that you get different key servers.

I received the mail you sent and sent back a test.gpg encrypted with your key to the email address you sent from. I just checked with one of the keyservers listed in the output of the suggested host command and your key is there so there must be something different about the veridis.com server.

Code:

gpg --keyserver wwwkeys.de.pgp.net --recv-keys 6D090EE9
gpg: requesting key 6D090EE9 from hkp server wwwkeys.de.pgp.net
gpg: key 6D090EE9: "Nissanka De Silva (Le Grand Homme) <nissanka@swipnet.se>" not changed
gpg: Total number processed: 1
gpg:              unchanged: 1


Gins 08-19-2006 02:25 PM

Happy Tux

The file you sent was 'test.gpg'
I saved it.

How do I open the file 'test.gpg' ?

What is the command? Do I have to use my private key?

HappyTux 08-19-2006 02:46 PM

Quote:

Originally Posted by Gins
Happy Tux

The file you sent was 'test.gpg'
I saved it.

How do I open the file 'test.gpg' ?

What is the command? Do I have to use my private key?

I use kgpg -s test.gpg then it will pop-up a dialog asking for the password to your key then open in its editor and if not running KDE then gpg -d test.gpg will decrypt to the command line the one I sent is only a line so this would be quickest.

Gins 08-19-2006 03:11 PM

Happy Tux, please read the message I got whilst decrypting. It asked the paraphrase and I pasted it.
------------------------------------------------------------------------

[root@c83-250-110-112 nissanka]# gpg -d test.gpg

You need a passphrase to unlock the secret key for
user: "Nissanka De Silva (Le Grand Homme) <nissanka@swipnet.se>"
1024-bit ELG-E key, ID AD4FDA0A, created 2006-08-15 (main key ID 6D090EE9)

gpg: gpg-agent is not available in this session
gpg: Invalid passphrase; please try again ...

You need a passphrase to unlock the secret key for
user: "Nissanka De Silva (Le Grand Homme) <nissanka@swipnet.se>"
1024-bit ELG-E key, ID AD4FDA0A, created 2006-08-15 (main key ID 6D090EE9)

gpg: encrypted with 1024-bit ELG-E key, ID AD4FDA0A, created 2006-08-15
"Nissanka De Silva (Le Grand Homme) <nissanka@swipnet.se>"
This is a test it is only a test of the gpg encryption.
[root@c83-250-110-112 nissanka]#

----------------------------------------------------------------------

How do I find the file? It may have been gone to hell. What do you think?


-----------------------------------------------------
I repeated this again. Please read the following:

[root@c83-250-110-112 nissanka]# gpg -d test.gpg

You need a passphrase to unlock the secret key for
user: "Nissanka De Silva (Le Grand Homme) <nissanka@swipnet.se>"
1024-bit ELG-E key, ID AD4FDA0A, created 2006-08-15 (main key ID 6D090EE9)

gpg: gpg-agent is not available in this session
gpg: encrypted with 1024-bit ELG-E key, ID AD4FDA0A, created 2006-08-15
"Nissanka De Silva (Le Grand Homme) <nissanka@swipnet.se>"
This is a test it is only a test of the gpg encryption.
[root@c83-250-110-112 nissanka]#

Tinkster 08-19-2006 03:35 PM

Well, it obviously worked...
Quote:

This is a test it is only a test of the gpg encryption.
Both times.

If you want the file decrypted to another file, use the
--output newfile.txt
option ...


Cheers,
Tink

Gins 08-19-2006 03:57 PM

Thanks Tinkster

What is the command?
The following command won't decrypt it again to a new file called 'newfile.txt'.

[root@c83-250-110-112 nissanka]#gpg --output newfile.txt

Tinkster 08-19-2006 04:08 PM

*sigh*

gpg -d test.gpg --output newfile.txt

I think that, instead of complaining that they're incomprehensible, you
should put some more effort into reading the man-pages. With all the
energy you've put into this thread it should have been next to no problem
to understand
Code:

      --decrypt [file]
                Decrypt  file (or stdin if no file is specified)
                and write it to stdout (or  the  file  specified
                with --output). If the decrypted file is signed,
                the signature is  also  verified.  This  command
                differs  from the default operation, as it never
                writes to the filename which is included in  the
                file and it rejects files which don't begin with
                an encrypted message.

[edit]
And for the sake of completeness, or so I'm not being accused
of not knowing what I'm talking about again, you COULD have just
gone:

gpg test.gpg
[/edit]

[edit2]
Btw, for someone who's concerned with their security and privacy
it's quite silly to a) run their box as root and b) to publish their
IP address to the world
Code:

root@c83-250-110-112 nissanka
[/edit2]



Cheers,
Tink

Gins 08-19-2006 04:27 PM

Thanks Tinkster
I tried invain your commands. I wanted to put the output of the file to a new file called ' testing12000 '
----------------------------

[root@c83-250-110-112 nissanka]# gpg -d test.gpg testing12000
usage: gpg [options] --decrypt [filename]

[root@c83-250-110-112 nissanka]# gpg -d -output test.gpg testing12000
usage: gpg [options] --decrypt [filename]

[root@c83-250-110-112 nissanka]# gpg -d test.gpg -output testing12000
usage: gpg [options] --decrypt [filename]

[root@c83-250-110-112 nissanka]#

Tinkster 08-19-2006 04:33 PM

*sigh*
Read The Friendly Manual...

Or just my post above, for that matter. You should be
able to spot the difference between YOUR invocation and
what I typed (and no, I don't mean the name of the output
file that we chose to be different).



Cheers,
Tink

HappyTux 08-19-2006 04:45 PM

Quote:

Originally Posted by Gins
Thanks Tinkster
I tried invain your commands. I wanted to put the output of the file to a new file called ' testing12000 '
----------------------------


[root@c83-250-110-112 nissanka]# gpg -d test.gpg -output testing12000
usage: gpg [options] --decrypt [filename]

[root@c83-250-110-112 nissanka]#


Here you needed --output in the line the easiest way to remember this is in the vast majority of options if it is a letter then -a say if a word then --all you need the -- for a word option. BTW you may want to see about installing the gnupg-agent, pinentry-qt, pinentry-curses, kgpg and gpgsm packages (or whatever they call them in Mandrake) if not already installed they help with using gpg.


All times are GMT -5. The time now is 06:16 PM.