views:

799

answers:

4

Hey everyone, I am researching a project where we would need to keep a value encrypted from the client all the way to a black box system without decrypting it at any point in between. We are using SSL between the browser and web server, but the values are automatically decrypted at the web server, which is what we need to keep from happening. We need to be able to pass it through the web server (still encrypted) and through other back end systems until it hits its final destination where it would be decrypted.

So my question is what options are available to us for maintaining an encrypted state for a value from the browser back, without decrypting it anywhere along the way?

Thanks Mark

+2  A: 

you'll want to take a look at public key encryption. SSL protects your session (browser <-> server) but not the full transport. i'd suggest encrypting your data once it's received from the client, then sending the encrypted data all the way in.

here's a terrible diagram outlining the flow of data

        client browser    web server       random server       blackbox
route   ---- SSL -------------><------------- not encrypted ------->
data                          *-------- PGP/GPG encrypted --------->

basically your data is encrypted via SSL to the web server, where it is PGP/GPG encrypted, then sent downstream. SSL doesn't matter at this point (or at least, isn't the primary form of encryption).

unless you can guarantee javascript in your environment, it may be better to encrypt at the web server to make sure your data is secure if the user has javascript off for some reason.

Owen
+3  A: 

Have you thought about doing a simple RSA encryption on the values and sending that through the system? You will need to make sure the clients have the public key in which to encrypt the data with, but that would be easy and secure enough to pass around.

To my knowlege, most libraries out there will support RSA. A nice demo of how to do it purely in Javascript can be found here.

Dillie-O
Another RSA implementation here: http://www.ohdave.com/rsa/ and PGP here: http://www.hanewin.net/encrypt/
Joe Kuemerle
+1  A: 

If you use a binary type in your database, the web server should send it as-is. Your client can then encrypt the data before inserting it, and would then have to decrypt the data after fetching it. Neither the web server nor the database server itself would be able to view the data.

Graeme Perrow
A: 

The black box system, by definition, can't decrypt the data unless it was built to do that. I'll suggest discussing the problem with the developers of the black box system.

Seun Osewa