gpg encrypt user emails with rails
While using kraken.com to do some basic crypto trading, I came across what I think is a great feature. If you go to your account settings, you will find that you can add a PGP Public Key. Once you add your public key, all emails containing sensitive information will be encrypted for that public key before being sent to you.
I wish more of the sites I use had this feature. Since I haven’t implemented this behavior in any of the projects I’ve worked on, I wanted to put together an example to show myself it wasn’t too difficult to do.
You can see the example project I put together here: https://github.com/z2e3r40o/rails-with-gpg
The following technologies were used to put this example together:
In practice any one of these can be different.
This rails-with-gpg repository can be deployed to heroku by simply cloning the repository, updating the config, and deploying to a heroku dyno. The README provides more instructions.