I’m trying to create this kind of system:
- a user writes a mail with confidential data in it
- I manage them with PHP, sending them to the administrator
- only administrator should be able to open that mail
Achieving this seems to be possible this way:
- encrypt the mail using an Outlook Express-compatible encryption (DES, 3DES, RC” (various bit)) with PHP and an asymmetric pubblic key.
- decrypt the mail using Outlook Express with an account that owns the asymmetric private key
However, I totally don’t know what kind of certificate should I use, how to get it (I’d like to get at least a free one to do some testing) and I’m not sure this infrastructure would work.
You can use PGP for this. It’s more or less the standard of encrypting mails and there is a free open source utility for the server side of things. In the client, your users will have to install a plugin of which there are several to pick from.
I don’t know of any native bindings of GnuPG for php, but you can execute it over the command line, using
shell_execUpdate: Looks like someone even wrote a tutorial on this: http://devzone.zend.com/article/1265