We are developing an application sending highly sensitive data over the Internet. For this we use client side encryption so that even if an attacker would get access to our servers, the data could not be decrypted. Now our clients want the application to be web based. That is a problem because now an attacker could modify the JavaScript code on the server, making all kinds of attacks possible.
Can we protect the code somehow? Is it possible to sign the JavaScript code using a private key and configure the Browser to test the signature?