Re: How to import pub keys with gnupg
Well, using the '-a' on the export did work to get rid of the 'public key not found' error when doing: # gpg -r B -se file1 I had actually tried this before. But when 'B' goes to decrypt the file1.gpg this is what happens: #cat /home/A/file1.gpg | gpg gpg: public key decryption failed: secret key not available gpg: decryption failed: secret key not available Why can't B find his own secret key? It should be in his .gnupg directory. Thanks for the help with the unsecured memory. Bill
Re: How to import pub keys with gnupg
[EMAIL PROTECTED] wrote: Well, using the '-a' on the export did work to get rid of the 'public key not found' error when doing: # gpg -r B -se file1 That's the correct syntax for doing this. I had actually tried this before. But when 'B' goes to decrypt the file1.gpg this is what happens: #cat /home/A/file1.gpg | gpg gpg: public key decryption failed: secret key not available gpg: decryption failed: secret key not available Why can't B find his own secret key? It should be in his .gnupg directory. It looks like the secret-key is not available. This can be checked by doing gpg --list-secret-keys. Then you see which secret key is available for encrypten and/or signing. With gpg --list-keys you can see who's key is available. So you should check the available keys carefully. It looks like you have made a mistake while importing and exporting the keys. I suggest that you deleted the files in the .gnupg directory and generate new keys and then export them with the -a-Option and you should always specific who's key you want to export. Thanks for the help with the unsecured memory. Hm, I'm going to look if this is a know bug or not and then write a mail to the maintainer. Ciao Christian -- /* http://www.rhein-neckar.de/~jupiter/Christian Kurz */
How to import pub keys with gnupg
I've been experimenting with gpg and have hit a little snag. First I create two user accounts. A and B. I logged in with A and did: # gpg --gen-key # gpg --export pub_keys I then did the same with B. Next I tried to import A's public key # gpg --import /home/A/pub_keys But I get the error message: gpg: Warning: using insecure memory! gpg: packet(6) with unknown version 64 gpg:/home/A/pub_keys: key : no user id gpg: Total number processed: 1 Then I log back into A and try to import B's public key. # gpg --import /home/B/pub_keys gpg: Warning: using insecure memory! gpg: packet(6) with unknown version 64 gpg:/home/B/pub_keys: key : no user id gpg: Total number processed: 1 The I try to encrypt a file so that only B can read it. # gpg -r B -se file1 gpg: B: skipped: public key not found gpg: file1: sign+encrypt failed: public key not found So, where am I going wrong? It has to be a stupid error in the export or import. But where? Also, why am I getting the insecure memory warning? I read the FAQ, README and gpg man page that came with the .deb, and followed the instructions. I thought they where pretty clear. Lots of examples, but I guess not clear enough. Is there another doc I should check out?
Re: How to import pub keys with gnupg
[EMAIL PROTECTED] wrote: I've been experimenting with gpg and have hit a little snag. [some stuff deleted] So, where am I going wrong? It has to be a stupid error in the export or import. But where? You should try the option -a. So you should use the following command to extract a key gpg --export -a _name_of_key_. Also, why am I getting the insecure memory warning? Because it would be better to make gpg suidroot, because then it use secure memory and also drops this bit very fast. I'm using it here and it works great. This way is also recommend by the author of gnupg. Ciao Christian -- /* http://www.rhein-neckar.de/~jupiter/Christian Kurz */