The Linux implementation of pgp, the GnuPG looks into the folder ~/.gnupg for the keys to encrypt or decrypt. Since the program i'm running to decrypt and encrypt has to run as "nobody" user, i'm not sure how to handle the keys for encryption and decryption.

Is there a way by which we can store the public/private key in a file, and use it for encryption/decryption?

Is there any other implementation for PGP in linux?


P.S. I am not sure whether i should ask this question in this Forum(Linux Security. Correct me if i'm wrong)