Thanks but unfortunately I can't use Perl, Python or any of this kind of advanced scripting language on my web server. I have to stick to shell scripting.
I'm slowly working my way through though. I will definitely use GnuPG and not RSA finally, for GnuPG is much more known. I'll just have to read the manual page many times.