LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-26-2006, 07:40 AM   #1
TatforTit
LQ Newbie
 
Registered: Feb 2006
Location: USA
Distribution: Mandriva 2006
Posts: 28

Rep: Reputation: 15
GPG Encryption Problems in Kmail


Hi.

This may be a silly question, but I am having a problem with GPG inside of Kmail. I have already installed GPG, generated a key, signed it and imported it into Kmail via the "Security" setup options. My problem is whenever I send myself an encrypted email, just as a test, when I try to read the received mail, I get a large error message inside the email saying the file cannot be decrypted. I am probably missing something minor, but I have spent a couple hours trying to figure out why I can't decrypt my own email with my own key. It doesn't even prompt me for my password, it just says the encryption plug-in could not decrypt the message.

Thoughts?
 
Old 02-26-2006, 01:23 PM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
Hi,

Couple of questions:

Which version of KDE/KMail are you using?

Is your GPG-Agent process running?


Cheers,
Tink
 
Old 02-26-2006, 05:42 PM   #3
TatforTit
LQ Newbie
 
Registered: Feb 2006
Location: USA
Distribution: Mandriva 2006
Posts: 28

Original Poster
Rep: Reputation: 15
I am using Mandriva 2006, so I think the Kmail version is 1.8. As for gpg-agent that is another thing, whenever I go to the command line I get a message saying gpg-agent is not running, but I am pretty sure it is installed. Maybe I just need to reconfigure gpg-agent?
 
Old 02-26-2006, 06:03 PM   #4
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
The thing is that you need to start the agent, and then (from the
same shell!) start kmail. Make a script like
Code:
#!/bin/bash
eval "$(gpg-agent --daemon)"
kmail --check $1 > /dev/null 2>&1 && "skill -9 gpg-agent"
and use that to start KMail ...


Cheers,
Tink
 
Old 02-26-2006, 06:27 PM   #5
TatforTit
LQ Newbie
 
Registered: Feb 2006
Location: USA
Distribution: Mandriva 2006
Posts: 28

Original Poster
Rep: Reputation: 15
I tried that script twice and it started kmail but still I get the message when I look at the encrypted email of "Encrypted Data Not Shown" and it says the "crypto-plug-in failed." Maybe I don't have gpg-agent installed afterall. Is there a way to check? When I go to the terminal and enter: "gpg-agent" I get the following reply:


PHP Code:
can't connect to '/home/me/.gnupg/S.gpg-agent': no such file or directory
gpg-agent: no gpg-agent running in this session 

If it isn't installed, is there a quick link from where I can download an rpm?
 
Old 02-26-2006, 06:46 PM   #6
TatforTit
LQ Newbie
 
Registered: Feb 2006
Location: USA
Distribution: Mandriva 2006
Posts: 28

Original Poster
Rep: Reputation: 15
OK, I just checked and gpg-agent is indeed running. I sent myself another email encrypted and I still get the message:

Encrypted message (decryption not possible)
Reason: Crypto plug-in "openpgp" could not decrypt the data.
Error: Decryption failed
Encrypted data not shown.
End of encrypted message


Maybe I need to change settings inside of Kmail itself? The problem is I cannot find recent tutorials for Kmail 1.8.

Last edited by TatforTit; 02-26-2006 at 06:48 PM.
 
Old 02-26-2006, 06:52 PM   #7
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
The agent is actually part of GNU PG ... (if you're using GPG 1.9 or
above) or separately available for older GPGs ... no idea about the
RPMs, I'm compiling these things :}

As for the "being installed" ... does
which gpg-agent
return anything?
Or a locate gpg-agent?



Cheers,
Tink
 
Old 02-26-2006, 06:54 PM   #8
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
Well, obviously GPG and GPG aren't the same. Look at the settings
in KMail again...


Cheers,
Tink
 
Old 02-26-2006, 06:58 PM   #9
TatforTit
LQ Newbie
 
Registered: Feb 2006
Location: USA
Distribution: Mandriva 2006
Posts: 28

Original Poster
Rep: Reputation: 15
First, let me say thanks for all of your replies, Tinskter.

As for the command "which gpg-agent"

I get the following return:
PHP Code:
/usr/bin/gpg-agent 
So, I suppose gpg-agent is indeed "located" and "installed." Any other suggestions? I have generated a public and private key, have the key inside of Kmail signed, have gpg-agent running. What am I missing?
 
Old 02-26-2006, 07:07 PM   #10
TatforTit
LQ Newbie
 
Registered: Feb 2006
Location: USA
Distribution: Mandriva 2006
Posts: 28

Original Poster
Rep: Reputation: 15
Quote:
Well, obviously GPG and GPG aren't the same. Look at the settings
in KMail again...
Are you saying GPG and OpenPGP are not the same? In Kmail when you go to the security tab and look at "crypto backends" mine has two listed:

OpenPGP (gpg)
S/MIME (gpgsm)

in exactly that format. According to Kmail, OpenPGP is GPG.
 
Old 02-26-2006, 09:06 PM   #11
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
You're most likely using the latter. And indeed, OpenPGP and GPG
are quite distinct.


Cheers,
Tink
 
Old 02-26-2006, 09:24 PM   #12
TatforTit
LQ Newbie
 
Registered: Feb 2006
Location: USA
Distribution: Mandriva 2006
Posts: 28

Original Poster
Rep: Reputation: 15
Ok, thanks for clarifying that.

Is there any way to get the gpg I have installed to work with Kmail? If not should I get OpenGPG? If I need to do that, can you tell me quickly how to "uninstall" GPG (if I need to) when I install OpenGPG? Also, will my current key be compatible?

Thanks in advance.
 
Old 02-26-2006, 10:15 PM   #13
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
Which version of gpg have you got installed?

gpg --version

And: what do you think of the idea of me moving this thread
to the mandriva forum? Maybe others who suffer(ed) from this can
help you better than someone whose install in slack works?



Cheers,
Tink
 
Old 02-27-2006, 12:02 AM   #14
TatforTit
LQ Newbie
 
Registered: Feb 2006
Location: USA
Distribution: Mandriva 2006
Posts: 28

Original Poster
Rep: Reputation: 15
Sure, moving the thread is fine.

My version of GPG is 1.4.2.

I opened the RPMDrake utility on Mandriva and it has an option to see what software you currently have installed. It appears I have two versions of GPG installed. The packages are as follows:

gnupg2.1.9-16-4mdk
gnupg-1.4.2-2mdk

The summary and description is identical on both, it reads:

Quote:
Summary: GNU privacy guard - a free PGP replacement

Description: GnuPG is GNU's tool for secure communication and data storage. It can be used to encrypt data and to create digital signatures. It includes an advanced key management facility and is compliant with the proposed OpenPGP Internet standard as described in RFC2440.
The last line is what confused me relative to what you said earlier. It says here that gpg is "complaint" with OpenPGP.

Maybe I need both of these packages or maybe one needs to be uninstalled? I really have no idea since it seems whenever I install new software that the rpmdrake utility often says it needs to install other supporting files. Maybe one package works in a supporting role with the other?
 
Old 02-27-2006, 11:04 AM   #15
craigevil
Senior Member
 
Registered: Apr 2005
Location: OZ
Distribution: Debian Sid
Posts: 4,734
Blog Entries: 12

Rep: Reputation: 462Reputation: 462Reputation: 462Reputation: 462Reputation: 462
Having the same problem.

PCLinuxOS .92
gpg (GnuPG) 1.2.5
KDE 3.5.1
kernel 2.6.12-oci6.mdk-i586-up-1GB

I get the exact same msg:
Encrypted message (decryption not possible)
Reason: Crypto plug-in "openpgp" could not decrypt the data.
Error: Decryption failed
Encrypted data not shown.
End of encrypted message

gpg-agent IS running.
Even tried opening the msg.asc with Kgpg and nothing happens.
 
  


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
gpg filename encryption ??? rino.caldelli Linux - Security 2 02-26-2006 06:34 AM
gpg encryption for signing keys synapse Mandriva 1 01-22-2004 10:10 AM
gpg / pgp encryption pteren Linux - Software 8 07-26-2003 03:14 AM
kmail and GPG jayakrishnan Linux - Security 1 07-10-2003 06:20 AM
KMail encryption. Unknown_User Linux - Security 1 02-11-2003 05:40 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:26 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