First of all I have to tell all those that do not know it:
I come from Germany and I don't like beer.
I drink wine and most other 'alcoholic beverages' but I don't drink beer. That means it is only of theoretical value if you promise to give out a beer.
But if you do, I will take that as a sport - and hopefully find a way to do what you want:
I was asked how well kgpg of kdeutils worked and as it wasn't on my build list before, I added a script and tried it out: and it crashed.
So far I couldn't really get something useful out of kgpg so I took out gdb and tested a bit: and it turned out that right after running gpg through a QProcess kgpg segfault'ed. I didn't had gpg installed at that time, so I thought that a test for existance could be the problem. And yes - after I installed it, kgpg worked like a charm (although import of keys doesn't work).
I haven't yet made a patch, maybe the QProcess should be ported to KProcess and obviously the existance of gpg and the path of gpg should be searched for in advance. Maybe this is already within the code, I don't know.
But a beer I have earned anyway! ;-)