Computer Science - Solving yesterday's problems tomorrow
This particular wheel was re-invented years ago:
http://www.gnupg.org/
Create your public/private key pair, upload your public key and others can send you e-mail only you can decrypt.
Find for your friends on the key server, and you can send them e-mail only they can decrypt. (Although plenty of people can
tell who you send encrypted email to.)
In the UK you must regularly change your key and erase the old private key because the police can demand your password. If you do not bother to change your keys, you are better off keeping you password secret if your e-mails explain how to make bombs.