Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

I want a script that is running on the client to compute a collision resistant h

ID: 650203 • Letter: I

Question

I want a script that is running on the client to compute a collision resistant hash and send it to a server. I need to ensure that the script which performs this hash is not altered in any malicious way. Is there any protocol that exists which can ensure that the client script that calculates the hash has not been altered.

I have an idea whereby the script sends back an HMAC signature of itself, but on second thoughts, this would not stop an attacker from fooling the server if the code is altered.

Explanation / Answer

In short any proposed solution to this problem would be a violation of CWE-602: Client Side Enforcement of Server Side Security.

Even if what you are suggesting where possible in some bizzaro universe it would be insecure. A client (or an attacker) doesn't just execute scripts, they are able to view and modify everything in memory, as well as intercept, modify and create any request transmitted over the network. Thus checking the integrity of the script doesn't even close to solving the root of the problem. In short this proposal is a fundamental violation of modern security and there never will be a solution to this problem. (And no one should need to do this)

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote