{"action":"created","issue":{"url":"https://api.github.com/repos/jmazzi/crypt_keeper/issues/100","labels_url":"https://api.github.com/repos/jmazzi/crypt_keeper/issues/100/labels{/name}","comments_url":"https://api.github.com/repos/jmazzi/crypt_keeper/issues/100/comments","events_url":"https://api.github.com/repos/jmazzi/crypt_keeper/issues/100/events","html_url":"https://github.com/jmazzi/crypt_keeper/issues/100","id":67541364,"number":100,"title":"How to do Postgres PGP Public Key Decryption on the App Server","user":{"login":"tamiswa","id":553635,"avatar_url":"https://avatars.githubusercontent.com/u/553635?v=3","gravatar_id":"","url":"https://api.github.com/users/tamiswa","html_url":"https://github.com/tamiswa","followers_url":"https://api.github.com/users/tamiswa/followers","following_url":"https://api.github.com/users/tamiswa/following{/other_user}","gists_url":"https://api.github.com/users/tamiswa/gists{/gist_id}","starred_url":"https://api.github.com/users/tamiswa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tamiswa/subscriptions","organizations_url":"https://api.github.com/users/tamiswa/orgs","repos_url":"https://api.github.com/users/tamiswa/repos","events_url":"https://api.github.com/users/tamiswa/events{/privacy}","received_events_url":"https://api.github.com/users/tamiswa/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-04-10T08:31:20Z","updated_at":"2015-04-17T13:58:24Z","closed_at":"2015-04-16T14:40:18Z","body":"I am trying to use the PostgreSQL PGP Public Key encryptor.  However, mention somewhere in the docs that:\r\n> The private key is optional. If the private key is not present the ciphertext value is returned instead of the plaintext\r\n\r\nand...\r\n\r\n > Encryption is possible with only a public key. Any server that needs access to the plaintext will need the private key.\r\n\r\nDo you have any idea how I would do decryption (example code etc.) on the app server so I can keep the private keys completely off my database server?\r\n\r\nThanks for the awesome library!"},"comment":{"url":"https://api.github.com/repos/jmazzi/crypt_keeper/issues/comments/93991207","html_url":"https://github.com/jmazzi/crypt_keeper/issues/100#issuecomment-93991207","issue_url":"https://api.github.com/repos/jmazzi/crypt_keeper/issues/100","id":93991207,"user":{"login":"jmazzi","id":2273,"avatar_url":"https://avatars.githubusercontent.com/u/2273?v=3","gravatar_id":"","url":"https://api.github.com/users/jmazzi","html_url":"https://github.com/jmazzi","followers_url":"https://api.github.com/users/jmazzi/followers","following_url":"https://api.github.com/users/jmazzi/following{/other_user}","gists_url":"https://api.github.com/users/jmazzi/gists{/gist_id}","starred_url":"https://api.github.com/users/jmazzi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jmazzi/subscriptions","organizations_url":"https://api.github.com/users/jmazzi/orgs","repos_url":"https://api.github.com/users/jmazzi/repos","events_url":"https://api.github.com/users/jmazzi/events{/privacy}","received_events_url":"https://api.github.com/users/jmazzi/received_events","type":"User","site_admin":false},"created_at":"2015-04-17T13:58:24Z","updated_at":"2015-04-17T13:58:24Z","body":"Can you give a code example from your model showing the expected behavior\nyou want?\n\nOn Fri, Apr 17, 2015 at 3:49 AM, tamiswa <notifications@github.com> wrote:\n\n> @jmazzi <https://github.com/jmazzi> I don't think I explained my question\n> clearly enough. I know that all I have to do to bypass decryption from\n> within Postgres is not provide the private key to the crypt_keeper method.\n> My question is once I have the cyphertext, do you know how I can decrypt\n> myself in the model? I have tried using libraries like\n> https://github.com/ueno/ruby-gpgme with no success.\n>\n> —\n> Reply to this email directly or view it on GitHub\n> <https://github.com/jmazzi/crypt_keeper/issues/100#issuecomment-93937102>.\n>\n"}}