LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 05-06-2003, 12:42 PM   #1
pr1sg
LQ Newbie
 
Registered: Feb 2003
Distribution: Debian
Posts: 17

Rep: Reputation: 0
gpg problem


So I'm trying to figure out how this GPG thing works. I did
gpg --gen-key, which said
"public and secret key created and signed."

Then I decided to take a look at my public key and exported it into pub.asc. When I view it with mc, or gpg --export, I get this:

...>Ȧ....Xo.7=..LЪ^On....+_+_C.#K8..%.-lx*U ..b.G.3..\R.ڶ
...%.0m_E\.d.߼[[J.;_s..J(.._q(.&.]d
>.Fo.wV.9Ln..{.ħ.>-.].VN.E..+_.k_i"...@X...9s.......k_
..............
.5..Nu.....{.vku.׬S*,..C?.t.n"p.ZBxv...>ȧ....(..3
D..&$~.i.`-.`e).N7.S.F........>ȧ.
.5..Nu.._...X.%.KFGh*a.-.__2eT=.Q..YRZ.q.

I'm running woody with gpg 1.0.6.

My guess is that for some reason gpg uses a different encoding (I have enabled Cyrillic on console). Any ideas?
 
Old 05-10-2003, 05:03 AM   #2
rch
Member
 
Registered: Feb 2003
Location: Santa Clara,CA
Distribution: Mandriva
Posts: 909

Rep: Reputation: 48
Re: gpg problem

Quote:
Originally posted by pr1sg
So I'm trying to figure out how this GPG thing works. I did
gpg --gen-key, which said
"public and secret key created and signed."

Then I decided to take a look at my public key and exported it into pub.asc. When I view it with mc, or gpg --export, I get this:
I'm running woody with gpg 1.0.6.

My guess is that for some reason gpg uses a different encoding (I have enabled Cyrillic on console). Any ideas?
does
gpg --list-keys
work
try a sample file ;say x
gpg -sa x
check whether the encrypted file is created or not
(usually x.asc)
now decrypt it
gpg --decrypt x.asc
check whether it works
 
Old 05-10-2003, 08:37 PM   #3
pr1sg
LQ Newbie
 
Registered: Feb 2003
Distribution: Debian
Posts: 17

Original Poster
Rep: Reputation: 0
Thanks for your post. I did:
dir > x
gpg --list-keys
...pubring.gpg
<key pairs>
pub
sub
pub
sub

gpg -sa x
<<Passphrase entered>>

cat x.asc
-----BEGIN PGP MESSAGE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

owFdkTFLXEEQx9+dJnBLBP0E2cIuuByKbTiCBAORhGgVDo693T3d872dzc7uvXcW
aSSQMhwE0imkCQGtbFTsrCwiIiiIjW0+hPj2nmmy1c78f7P/2ZlvUxNJfebwcl91
7n8d1PZqo26teHnyI19SuOnBNhq0PFw4iJe+CJvKMI3AiiyLGYRgJJI3RkBmU+VV
xQepQYbMspwPKE258tpr3hEcPW82F1jfrpdYwG6GZIXrtLIRwTllvLYxKp/jQ+XG
ykBLBWRl2KZLIEJWMjgukI9NRnzLLDYXOyFjVvZiItdGQo7kvYO+Er5NVz33yIoU
KVUDSIPXYCJouAGGfKDGVgX5oAz3TIIYW/Tg0cxqgY0KYb7wjKMgqxvcKVk1ry0K
p61ndhhDG7oRqQrE0JE1sG0KvTZdLhUs8v9qPsdhbkDwcUZz8e+pxlJIkXx9PZnM
1JOnT+pxMQlpTP/bV+s62dk6nyXrl2e/7/7cjl4c3c/ffHfPkt3Rl3diuXV82nr7
/OfVq49/L84+bT8A
=drfR
-----END PGP MESSAGE-----

gpg --decrypt x.asc
<<correct dir output>>
gpg: Signature made <> using DSA key ID #######
gpg: Good signature from ##########

So gpg works. The question is - how do I make my GPG key available/readable to others?
 
Old 05-10-2003, 11:59 PM   #4
rch
Member
 
Registered: Feb 2003
Location: Santa Clara,CA
Distribution: Mandriva
Posts: 909

Rep: Reputation: 48
Quote:
Originally posted by pr1sg
Thanks for your post. I did:
dir > x
gpg --list-keys
...pubring.gpg
<key pairs>
pub
sub
pub
sub

gpg -sa x
<<Passphrase entered>>

cat x.asc
-----BEGIN PGP MESSAGE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

owFdkTFLXEEQx9+dJnBLBP0E2cIuuByKbTiCBAORhGgVDo693T3d872dzc7uvXcW
aSSQMhwE0imkCQGtbFTsrCwiIiiIjW0+hPj2nmmy1c78f7P/2ZlvUxNJfebwcl91
7n8d1PZqo26teHnyI19SuOnBNhq0PFw4iJe+CJvKMI3AiiyLGYRgJJI3RkBmU+VV
xQepQYbMspwPKE258tpr3hEcPW82F1jfrpdYwG6GZIXrtLIRwTllvLYxKp/jQ+XG
ykBLBWRl2KZLIEJWMjgukI9NRnzLLDYXOyFjVvZiItdGQo7kvYO+Er5NVz33yIoU
KVUDSIPXYCJouAGGfKDGVgX5oAz3TIIYW/Tg0cxqgY0KYb7wjKMgqxvcKVk1ry0K
p61ndhhDG7oRqQrE0JE1sG0KvTZdLhUs8v9qPsdhbkDwcUZz8e+pxlJIkXx9PZnM
1JOnT+pxMQlpTP/bV+s62dk6nyXrl2e/7/7cjl4c3c/ffHfPkt3Rl3diuXV82nr7
/OfVq49/L84+bT8A
=drfR
-----END PGP MESSAGE-----

gpg --decrypt x.asc
<<correct dir output>>
gpg: Signature made <> using DSA key ID #######
gpg: Good signature from ##########

So gpg works. The question is - how do I make my GPG key available/readable to others?
Check your public key ID with gpg --list-keys. It will be the string after 1024D on the line beginning with "pub."
now do the following
gpg --send-keys --keyserver wwwkeys.pgp.net <your public key>
Now for those who you want to give your encrypted message give your keyid(your public key).
Now the reciever will do:
gpg --recv-keys --keyserver wwwkeys.pgp.net keyid
The reciever will need to type in his/her password, and then your ID will automatically be added to his/her keyring.
Now the recieving person can decrypt the message you send.
(Remember that in this way anyone with your public key can decrypt your document)

Last edited by rch; 05-11-2003 at 12:09 AM.
 
Old 05-11-2003, 12:01 AM   #5
rch
Member
 
Registered: Feb 2003
Location: Santa Clara,CA
Distribution: Mandriva
Posts: 909

Rep: Reputation: 48
incidentally why are you using gpg maybe you could try openssl

Last edited by rch; 05-11-2003 at 12:05 AM.
 
Old 05-11-2003, 11:53 AM   #6
pr1sg
LQ Newbie
 
Registered: Feb 2003
Distribution: Debian
Posts: 17

Original Poster
Rep: Reputation: 0
Thanks rch
I exported the key as per your instructions, it seemed to work fine. I guess all the functionality is there even though the output is garbled. Incidentally, I tried to reproduce that behavior a few more times, and after I get the garbled key output, my bash prompt and everything I type is also garbled. I'm still not sure why it does that.

Anyway, I am just looking at some encryption software out there. Thanks for the openssl link, I'll give it a try...I'm yet to figure out if Opera M2 supports mail encryption.
 
Old 05-11-2003, 12:18 PM   #7
stickman
Senior Member
 
Registered: Sep 2002
Location: Nashville, TN
Posts: 1,552

Rep: Reputation: 53
You could also use --armor for plaintext output.
 
Old 05-11-2003, 11:25 PM   #8
rch
Member
 
Registered: Feb 2003
Location: Santa Clara,CA
Distribution: Mandriva
Posts: 909

Rep: Reputation: 48
Quote:
Originally posted by pr1sg
Thanks rch
I exported the key as per your instructions, it seemed to work fine. I guess all the functionality is there even though the output is garbled. Incidentally, I tried to reproduce that behavior a few more times, and after I get the garbled key output, my bash prompt and everything I type is also garbled. I'm still not sure why it does that.

Anyway, I am just looking at some encryption software out there. Thanks for the openssl link, I'll give it a try...I'm yet to figure out if Opera M2 supports mail encryption.
always encrypt in this way
gpg -sear filename
the a is important here (equivalent to --armor),it outputs ascii text.
see man gpg for what -sear means.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
problem with gpg key kpachopoulos *BSD 5 04-17-2007 02:32 PM
kdevelop and gpg problem kpachopoulos Fedora 1 06-18-2005 09:37 AM
gpg problem. TheRealDeal Linux - General 1 04-06-2005 02:54 AM
yum GPG problem bikov_k Linux - General 1 01-08-2005 09:17 PM
problem with gpg raven Linux - Software 1 09-29-2002 02:54 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 09:14 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration