title: Is there a way to verify the integrity of javascript files at the client?
body: <p>I'm working on what aims to be a secure method of user registration and authentication using php and javascript but not ssl/tls.</p>
  
  <p>I realise this may well be considered an impossible task that's been tried 1000 times before but I'm going to give it a go anyway. Every example I see online that claims to do it seems to have some huge fatal flaw!</p>
  
  <p>Anyway, my current problem is verifying javascript at the client. The problem being that if my sha1 implementation in javascript is modified by some man-in-the-middle it's not secure at all. If I could just verify that the received javascript has not been tampered with then I think I can pull this off.</p>
  
  <p>The real problem though, is that the only way to do things on the client side is javascript. Simple: write a javascript to verify the integrity of the other javascript files. Nope! Man-in-the-middle can just modify this file too.</p>
  
  <p>Is there a way around this?</p>