Imagine that you have a web application that encrypts the user's data, such as a note or spreadsheet, on both the server and client.
The normal process for a user using this web application is something like this:
- The user logs into the application using a login/password-hash stored on the server. (Like normal web applications.)
- The user enters an additional secure key that is used to encrypt the client side data. The web application uses a client side encryption library such as SJCL
In this example let's just focus on the client side.
The situation is this: The server has been compromised and an attacker access to the server side keys. The attacker does not have the client side keys as they are never stored on the server.
I understand that it's assumed that once you take over the server, you've lost, but I would like to know if my thoughts below allow for a client side secure solution.
These are the two ways I have thought about so far:
Take a hash of all files loaded to the client. This means requesting all of the files included again.
The common problem with both options is that whatever function is actually doing this hashing, it needs to be small enough that the concerned user can verify it's safe to use within a few seconds.
I am thinking that this hashing function loads into the browser like normal, and the user can type the function name from the console without the
() so they can see the code, and then type again with
() to run the code.
Then the hash should be good enough for proving that the web application is in a state that the user knows they have inspected in the past.
This could even become a plugin at some point, although I am determined to see if a native solution is possible.
Essentially what I am asking is, what methods exist that allow us to prove the integrity of the client's state?