0

I need to provide my users the assurance of privacy in their posts.

The posts are classic HTML generated by tinyMCE.

I need the users to define their encryption string before they save the post. I should be able to encrypt the html content based on their string and sent it over the wire to be stored in the DB. This way i suppose that i can assure them that even i cannot read their posts unless i know their key.

When they request their post they should provide their string in order to be able to view it properly.

What would be the best approach for this scenario?

e4rthdog
  • 5,103
  • 4
  • 40
  • 89
  • 1
    Unless they are going to audit all the JavaScript on your page before entering data into the form, and do so every time they load the page, the only way you can really assure them of that is if they use some third party encryption software (such as GPG) to encrypt the data and then paste it into your form. – Quentin Mar 25 '13 at 14:32
  • But in this case they would have to decrypt their posts manually when they want to read them, won't they? – e4rthdog Mar 25 '13 at 14:37
  • 1
    Use SSL / TLS to secure the connection, and encrypt it server side. – Crisp Mar 25 '13 at 14:43
  • 1
    @Crisp: That has the same drawback as Quentin already said about James' answer: "If the encryption is done in PHP, then it is done on the server, so the unencrypted data must be sent to the server where the person running the server can read it." – Marcel Korpel Mar 25 '13 at 14:45
  • @Crisp : yeap but i am looking if there is any way i can persuade the users that noone excepet them are able to see their content. – e4rthdog Mar 25 '13 at 14:46
  • 1
    There's no way around that short of asking them to encrypt it themselves before sending as @Quentin suggests. Doing that, they'd need to hand over their pub key to whoever does have access to read their posts, which they're probably going to want to do by giving you the pubkey so you can decrypt it to be read, or giving it to the person who actually wants to read it, and then THEY will have to give it to you so you can decrypt it, or copy paste the encrypted text and decrypt it themselves locally. – Crisp Mar 25 '13 at 14:54

0 Answers0