Sending PGP-Encrypted Mail with Perl & GnuPG

GnuPG is a free and open implementation of the OpenPGP standard, and I'm using that in a project, to automatically send encrypted messages to one of our suppliers.

It is rather easy to implement actually: after downloading the Crypt::OpenPGP Perl module (and dozens of dependencies), the rest is quite simple.

After generating a suitable keypair, Crypt::OpenPGP can take a file and encrypt it to the key of the recipient.

In this specific case, the data flow is as follows: my client uses a small Win32 program which utilizes Curl to submit a file via secure HTTP to a web service. That service receives the data stream, encrypts it with GnuPG and sends the result off via SMTP to the intended recipient.

Post a Comment

*Required Full name
*Required (Never published)