Forum Moderators: coopster

Message Too Old, No Replies

Encrypting Email

         

kevin_m

9:09 pm on Jul 22, 2003 (gmt 0)

10+ Year Member



I have a non-profit client who has a donation form on their website. Instead of storring credit card info on the site, I have read that I can have a form that takes the credit card information and encrypts it when the user submits. An email is then sent to a specific person in the orginization that decrypts it.

I have seen the GnuPG, but I am totally lost on how to install this on my windows server, never mind get the form encrypted. Has anyone had any experience with this that could shed some light for me?

Thanks!
Kevin

bcolflesh

9:15 pm on Jul 22, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Don't store it on the site or send it through a form - get an SSL cert installed on the server and take orders on the properly secured page.

kevin_m

9:35 pm on Jul 22, 2003 (gmt 0)

10+ Year Member



I do have certificate, they only have the ability to process the credit card in house at the moment.

dingman

6:55 pm on Jul 23, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



OK, I don't do windows, so I can't help with the actual installation instructions. However, the basics of what you need to do are pretty straightforward.

The server needs an installation of GnuPG, and the public key of the person who needs to get the data sent. You may choose to also have a public/private key pair for the server, so that you can sign the order data to verify that it did indeed come from your server. However, remember that you should *never* keep the key to which you are encrypting the credit card data on the server.

The person receiving the order data, of course, needs either GnuPG or PGP and their own public/private key pair. If you create a key pair for the server to sign with, then the recipient needs a copy of the server's public key.

When you get an order, you can use shell_exec() [php.net] or a relative to run GPG on the order data, in order to get the encrypted (and optionally signed) text to be used as the body of the message. Ideally, the credit card data would be send to GPG on standard input, rather than written to disk, but I'm not sure if any of the PHP execution functions allow you to define stdin for the command you are calling. Temporary named pipes (looks like a file, smells like a file, but it's a pipe) might be a solution to that problem.

Once you've got the blob of encrypted text back from your GPG call, you can just use mail() to send the blob to the appropriate person. That person then feeds the message to GPG or PGP, types in the password for their private key, and gets the plain text donation info.

Unfortunately, as I said, I have no idea how to do much of anything with Windows. I don't touch it when I can help it, and I can usually help it.